mirror of https://github.com/FreeRDP/FreeRDP
Fix #4725: Need to copy data.
This commit is contained in:
parent
a0fddd1747
commit
8f7dbe5051
|
@ -127,8 +127,14 @@ static BOOL update_read_bitmap_data(rdpUpdate* update, wStream* s,
|
|||
if (Stream_GetRemainingLength(s) < bitmapData->bitmapLength)
|
||||
return FALSE;
|
||||
|
||||
Stream_GetPointer(s, bitmapData->bitmapDataStream);
|
||||
if (bitmapData->bitmapLength > 0)
|
||||
{
|
||||
bitmapData->bitmapDataStream = malloc(bitmapData->bitmapLength);
|
||||
if (!bitmapData->bitmapDataStream)
|
||||
return FALSE;
|
||||
memcpy(bitmapData->bitmapDataStream, Stream_Pointer(s), bitmapData->bitmapLength);
|
||||
Stream_Seek(s, bitmapData->bitmapLength);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue