summaryrefslogtreecommitdiffstats
path: root/sesman/chansrv/sound.c
diff options
context:
space:
mode:
authorLukas Vacek <lucas.vacek@gmail.com>2013-06-22 21:57:16 +0100
committerLukas Vacek <lucas.vacek@gmail.com>2013-06-22 21:57:16 +0100
commite7fe39a65b732a2dcfeabce1d68edcb63b9a1c32 (patch)
tree51aba5e009b2fd1ffb59e8a51da0ffaa0d9bd11a /sesman/chansrv/sound.c
parenta0f8afca500702408f577a3b64f792700d40c01e (diff)
downloadxrdp-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/sound.c')
-rw-r--r--sesman/chansrv/sound.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sesman/chansrv/sound.c b/sesman/chansrv/sound.c
index 55f6f88d..c4ca8261 100644
--- a/sesman/chansrv/sound.c
+++ b/sesman/chansrv/sound.c
@@ -302,6 +302,7 @@ sound_send_wave_data_chunk(char *data, int data_bytes)
if ((data_bytes < 4) || (data_bytes > 128 * 1024))
{
LOG(0, ("sound_send_wave_data_chunk: bad data_bytes %d", data_bytes));
+ return 0;
}
/* part one of 2 PDU wave info */