fix [libfreerdp/codec]: heap buffer overflow in TestFreeRDPCodecClear
authorBernhard Miklautz <bernhard.miklautz@thincast.com>
Mon, 5 Nov 2018 14:43:12 +0000 (15:43 +0100)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Mon, 5 Nov 2018 14:43:12 +0000 (15:43 +0100)
The examples and the allocated buffers assume that the destination
starts with x 0 and y 0 and not 1/1.

libfreerdp/codec/test/TestFreeRDPCodecClear.c

index 2ae355e..bccec0c 100644 (file)
@@ -58,7 +58,7 @@ static BOOL test_ClearDecompressExample(UINT32 nr, UINT32 width, UINT32 height,
                goto fail;
 
        status = clear_decompress(clear, pSrcData, SrcSize, width, height,
-                                 pDstData, PIXEL_FORMAT_XRGB32, 0, 1, 1, width, height,
+                                 pDstData, PIXEL_FORMAT_XRGB32, 0, 0, 0, width, height,
                                  NULL);
        printf("clear_decompress example %"PRIu32" status: %d\n", nr, status);
        fflush(stdout);