codec: check return value of realloc.
authorZhang Zhaolong <zhangzl2013@126.com>
Wed, 11 Mar 2015 06:18:45 +0000 (14:18 +0800)
committerZhang Zhaolong <zhangzl2013@126.com>
Wed, 11 Mar 2015 06:18:45 +0000 (14:18 +0800)
Signed-off-by: Zhang Zhaolong <zhangzl2013@126.com>
libfreerdp/codec/rfx.c

index 3838730..a4e00a7 100644 (file)
@@ -728,6 +728,8 @@ static BOOL rfx_process_message_tileset(RFX_CONTEXT* context, RFX_MESSAGE* messa
        Stream_Read_UINT32(s, tilesDataSize); /* tilesDataSize (4 bytes) */
 
        context->quants = (UINT32 *)realloc((void*) context->quants, context->numQuant * 10 * sizeof(UINT32));
+       if (!context->quants)
+               return FALSE;
 
        quants = context->quants;