mirror of https://github.com/FreeRDP/FreeRDP
core: Correct handling of MultifragMaxRequestSize (Fixes #1022)
This commit is contained in:
parent
2e8a0983dd
commit
a0de1b18bd
|
@ -2190,10 +2190,13 @@ BOOL rdp_print_desktop_composition_capability_set(STREAM* s, UINT16 length)
|
|||
|
||||
BOOL rdp_read_multifragment_update_capability_set(STREAM* s, UINT16 length, rdpSettings* settings)
|
||||
{
|
||||
UINT32 multifragMaxRequestSize;
|
||||
if (length < 8)
|
||||
return FALSE;
|
||||
|
||||
stream_read_UINT32(s, settings->MultifragMaxRequestSize); /* MaxRequestSize (4 bytes) */
|
||||
stream_read_UINT32(s, multifragMaxRequestSize); /* MaxRequestSize (4 bytes) */
|
||||
if (settings->MultifragMaxRequestSize < multifragMaxRequestSize)
|
||||
settings->MultifragMaxRequestSize = multifragMaxRequestSize;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -340,7 +340,7 @@ static int fastpath_recv_update_data(rdpFastPath* fastpath, STREAM* s)
|
|||
|
||||
stream_check_size(fastpath->updateData, size);
|
||||
stream_copy(fastpath->updateData, comp_stream, size);
|
||||
if (stream_get_size(fastpath->updateData) > rdp->settings->MultifragMaxRequestSize)
|
||||
if (stream_get_length(fastpath->updateData) > rdp->settings->MultifragMaxRequestSize)
|
||||
{
|
||||
printf("fastpath PDU is bigger than MultifragMaxRequestSize\n");
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue