mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
Fixed zero sized allocation.
This commit is contained in:
6
libfreerdp/cache/glyph.c
vendored
6
libfreerdp/cache/glyph.c
vendored
@@ -796,6 +796,9 @@ CACHE_GLYPH_ORDER* copy_cache_glyph_order(rdpContext* context, const CACHE_GLYPH
|
||||
|
||||
if (glyph->unicodeCharacters)
|
||||
{
|
||||
if (glyph->cGlyphs == 0)
|
||||
goto fail;
|
||||
|
||||
dst->unicodeCharacters = calloc(glyph->cGlyphs, sizeof(WCHAR));
|
||||
|
||||
if (!dst->unicodeCharacters)
|
||||
@@ -855,6 +858,9 @@ CACHE_GLYPH_V2_ORDER* copy_cache_glyph_v2_order(rdpContext* context,
|
||||
|
||||
if (glyph->unicodeCharacters)
|
||||
{
|
||||
if (glyph->cGlyphs == 0)
|
||||
goto fail;
|
||||
|
||||
dst->unicodeCharacters = calloc(glyph->cGlyphs, sizeof(WCHAR));
|
||||
|
||||
if (!dst->unicodeCharacters)
|
||||
|
||||
Reference in New Issue
Block a user