From dfa30fbef644486f889266e442bd7a98104920cd Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 12 Sep 2013 11:23:50 -0700 Subject: [PATCH] Fill output with zeroes for short name. --- src/protocols/rdp/compat/winpr-stream.h | 2 ++ src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/protocols/rdp/compat/winpr-stream.h b/src/protocols/rdp/compat/winpr-stream.h index acefa68b..d60b030e 100644 --- a/src/protocols/rdp/compat/winpr-stream.h +++ b/src/protocols/rdp/compat/winpr-stream.h @@ -63,6 +63,8 @@ #define Stream_GetPointer stream_get_mark #define Stream_EnsureRemainingCapacity stream_check_size #define Stream_Write stream_write +#define Stream_Zero stream_write_zero +#define Stream_Fill stream_set_byte #define Stream_GetPosition stream_get_pos #define Stream_SetPosition stream_set_pos #define Stream_SetPointer stream_set_mark diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c index 203c1cf0..fbb88f2a 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c @@ -100,7 +100,7 @@ void guac_rdpdr_fs_process_query_both_directory_info(guac_rdpdr_device* device, /* Apparently, the reserved byte here must be skipped ... */ - Stream_Seek(output_stream, 24); /* ShortName */ + Stream_Zero(output_stream, 24); /* FileName */ Stream_Write(output_stream, utf16_entry_name, utf16_length); /* FileName */ svc_plugin_send((rdpSvcPlugin*) device->rdpdr, output_stream);