Merge pull request #5080 from akallabeth/scanbuild-ex-warn
Scanbuild ex warn
This commit is contained in:
commit
7ad24b6069
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)
|
||||
|
@ -339,7 +339,7 @@ BOOL planar_decompress(BITMAP_PLANAR_CONTEXT* planar,
|
||||
UINT32 rawWidths[4];
|
||||
UINT32 rawHeights[4];
|
||||
BYTE FormatHeader;
|
||||
const BYTE* planes[4];
|
||||
const BYTE* planes[4] = { 0 };
|
||||
const UINT32 w = MIN(nSrcWidth, nDstWidth);
|
||||
const UINT32 h = MIN(nSrcHeight, nDstHeight);
|
||||
const primitives_t* prims = primitives_get();
|
||||
|
@ -1394,11 +1394,17 @@ BOOL license_answer_license_request(rdpLicense* license)
|
||||
|
||||
license->EncryptedHardwareId->type = BB_ENCRYPTED_DATA_BLOB;
|
||||
if (!license_encrypt_and_MAC(license, license->HardwareId, HWID_LENGTH, license->EncryptedHardwareId, signature))
|
||||
{
|
||||
free(license_data);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
calBlob = license_new_binary_blob(BB_DATA_BLOB);
|
||||
if (!calBlob)
|
||||
{
|
||||
free(license_data);
|
||||
return FALSE;
|
||||
}
|
||||
calBlob->data = license_data;
|
||||
calBlob->length = license_size;
|
||||
|
||||
|
@ -1257,6 +1257,9 @@ void nego_enable_ext(rdpNego* nego, BOOL enable_ext)
|
||||
|
||||
BOOL nego_set_routing_token(rdpNego* nego, BYTE* RoutingToken, DWORD RoutingTokenLength)
|
||||
{
|
||||
if (RoutingTokenLength == 0)
|
||||
return FALSE;
|
||||
|
||||
free(nego->RoutingToken);
|
||||
nego->RoutingTokenLength = RoutingTokenLength;
|
||||
nego->RoutingToken = (BYTE*) malloc(nego->RoutingTokenLength);
|
||||
|
@ -2098,6 +2098,9 @@ static CACHE_BITMAP_V2_ORDER* update_read_cache_bitmap_v2_order(rdpUpdate* updat
|
||||
if (Stream_GetRemainingLength(s) < cache_bitmap_v2->bitmapLength)
|
||||
goto fail;
|
||||
|
||||
if (cache_bitmap_v2->bitmapLength == 0)
|
||||
goto fail;
|
||||
|
||||
cache_bitmap_v2->bitmapDataStream = malloc(cache_bitmap_v2->bitmapLength);
|
||||
|
||||
if (!cache_bitmap_v2->bitmapDataStream)
|
||||
|
Loading…
Reference in New Issue
Block a user