mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-14 08:24:16 +09:00
Prevent malloc of size 0
This commit is contained in:
@@ -332,7 +332,9 @@ int zgfx_decompress(ZGFX_CONTEXT* zgfx, const BYTE* pSrcData, UINT32 SrcSize, BY
|
||||
if (!zgfx_decompress_segment(zgfx, stream, Stream_GetRemainingLength(stream)))
|
||||
goto fail;
|
||||
|
||||
*ppDstData = (BYTE*) malloc(zgfx->OutputCount);
|
||||
*ppDstData = NULL;
|
||||
if (zgfx->OutputCount > 0)
|
||||
*ppDstData = (BYTE*) malloc(zgfx->OutputCount);
|
||||
|
||||
if (!*ppDstData)
|
||||
goto fail;
|
||||
|
||||
Reference in New Issue
Block a user