mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[winpr,stream] Check Stream_SetLength return
This commit is contained in:
@@ -1743,7 +1743,11 @@ static void* stream_copy(const void* obj)
|
||||
if (!dst)
|
||||
return nullptr;
|
||||
memcpy(Stream_Buffer(dst), Stream_ConstBuffer(src), Stream_Capacity(dst));
|
||||
Stream_SetLength(dst, Stream_Length(src));
|
||||
if (!Stream_SetLength(dst, Stream_Length(src)))
|
||||
{
|
||||
Stream_Free(dst, TRUE);
|
||||
return nullptr;
|
||||
}
|
||||
Stream_SetPosition(dst, Stream_GetPosition(src));
|
||||
return dst;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user