From be7a10e660183043f19060c5b35c1476dd23f745 Mon Sep 17 00:00:00 2001 From: Norbert Federa Date: Fri, 14 Nov 2014 11:25:05 +0100 Subject: [PATCH] core: use zero padding in suppress output pdu Some legacy rdp servers seem to expect a zero padding after the allowDisplayUpdates byte, probably because they incorrectly parse the value as uint32. --- libfreerdp/core/update.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/core/update.c b/libfreerdp/core/update.c index 0adfbeb8f..2940b73a5 100644 --- a/libfreerdp/core/update.c +++ b/libfreerdp/core/update.c @@ -829,7 +829,8 @@ static void update_send_refresh_rect(rdpContext* context, BYTE count, RECTANGLE_ static void update_write_suppress_output(wStream* s, BYTE allow, RECTANGLE_16* area) { Stream_Write_UINT8(s, allow); /* allowDisplayUpdates (1 byte) */ - Stream_Seek(s, 3); /* pad3Octets (3 bytes) */ + /* Use zeros for padding (like mstsc) for compatibility with legacy servers */ + Stream_Zero(s, 3); /* pad3Octets (3 bytes) */ if (allow > 0) {