diff options
author | Lukas Vacek <lucas.vacek@gmail.com> | 2013-06-22 21:57:16 +0100 |
---|---|---|
committer | Lukas Vacek <lucas.vacek@gmail.com> | 2013-06-22 21:57:16 +0100 |
commit | e7fe39a65b732a2dcfeabce1d68edcb63b9a1c32 (patch) | |
tree | 51aba5e009b2fd1ffb59e8a51da0ffaa0d9bd11a /sesman/chansrv/clipboard.c | |
parent | a0f8afca500702408f577a3b64f792700d40c01e (diff) | |
download | xrdp-proprietary-e7fe39a65b732a2dcfeabce1d68edcb63b9a1c32.tar.gz xrdp-proprietary-e7fe39a65b732a2dcfeabce1d68edcb63b9a1c32.zip |
Fix sound and clipboard crashes
- In case clipboard is not initialized, clipboard_data_in returns
(fixes a segfault)
- If less than 4 bytes are sent to sound_send_wave_data_chunk, it
returns
(fixes a segfault)
- When sending sound initiliazation messages set g_chan in chansrv to 0,
so the server waits for client to reply (this makes sound work afte
reconnecting)
- In process_message_channel_setup, clear any leftover data in
chan_items
Diffstat (limited to 'sesman/chansrv/clipboard.c')
-rw-r--r-- | sesman/chansrv/clipboard.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sesman/chansrv/clipboard.c b/sesman/chansrv/clipboard.c index 27c45fff..dc6d2484 100644 --- a/sesman/chansrv/clipboard.c +++ b/sesman/chansrv/clipboard.c @@ -1490,6 +1490,12 @@ clipboard_data_in(struct stream *s, int chan_id, int chan_flags, int length, struct stream *ls; char *holdp; + if (! g_clip_up) { + LOG(10, ("aborting clipboard_data_in - clipboard has not been initialized")); + // we return 0 here to indicate no protocol problem occured + return 0; + } + LLOGLN(10, ("clipboard_data_in: chan_id %d " "chan_flags 0x%x length %d total_length %d " "in_request %d g_ins->size %d", |