From f0adff1812fd5f1ce80a2cecb0b0aa2ce66bb61e Mon Sep 17 00:00:00 2001 From: Zhang Zhaolong Date: Wed, 11 Mar 2015 14:18:45 +0800 Subject: [PATCH] codec: check return value of realloc. Signed-off-by: Zhang Zhaolong --- libfreerdp/codec/rfx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 38387302a..a4e00a736 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -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;