Fixed invalid stream copy length.
authorArmin Novak <armin.novak@thincast.com>
Mon, 29 Feb 2016 11:51:54 +0000 (12:51 +0100)
committerArmin Novak <armin.novak@thincast.com>
Mon, 29 Feb 2016 11:51:54 +0000 (12:51 +0100)
libfreerdp/core/message.c

index 4692b00..76e0a69 100644 (file)
@@ -192,7 +192,7 @@ static BOOL update_message_SurfaceCommand(rdpContext* context, wStream* s)
        if (!wParam)
                return FALSE;
 
-       Stream_Copy(wParam, s, Stream_Capacity(s));
+       Stream_Copy(wParam, s, Stream_GetRemainingLength(s));
        Stream_SetPosition(wParam, 0);
 
        return MessageQueue_Post(context->update->queue, (void*) context,