From f50529dac0c3883bf7f5938ea45aa405ea1e897f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Mon, 16 Sep 2013 14:41:36 -0700 Subject: [PATCH] Fix buffer size. --- src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c index 95b36309..9d0e31e6 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c @@ -130,6 +130,8 @@ void guac_rdpdr_fs_process_read(guac_rdpdr_device* device, UINT32 length; UINT64 offset; + char buffer[4096]; + wStream* output_stream; guac_rdpdr_fs_file* file; @@ -142,7 +144,7 @@ void guac_rdpdr_fs_process_read(guac_rdpdr_device* device, Stream_Read_UINT32(input_stream, length); Stream_Read_UINT64(input_stream, offset); - output_stream = Stream_New(NULL, 21); + output_stream = Stream_New(NULL, 20 + sizeof(buffer)); /* Write header */ Stream_Write_UINT16(output_stream, RDPDR_CTYP_CORE); @@ -163,7 +165,6 @@ void guac_rdpdr_fs_process_read(guac_rdpdr_device* device, /* Otherwise, perform read */ else { - char buffer[4096]; int bytes_read; /* Read no more than size of buffer */