cliprdr: common: fix validation of file contents request pdu

This commit is contained in:
kubistika 2019-11-12 13:22:45 +02:00 committed by akallabeth
parent 09648834a0
commit 511f89cd99

View File

@ -352,9 +352,6 @@ UINT cliprdr_read_format_data_response(wStream* s, CLIPRDR_FORMAT_DATA_RESPONSE*
UINT cliprdr_read_file_contents_request(wStream* s, CLIPRDR_FILE_CONTENTS_REQUEST* request)
{
if (!cliprdr_validate_file_contents_request(request))
return ERROR_BAD_ARGUMENTS;
if (Stream_GetRemainingLength(s) < 24)
{
WLog_ERR(TAG, "not enough remaining data");
@ -375,6 +372,9 @@ UINT cliprdr_read_file_contents_request(wStream* s, CLIPRDR_FILE_CONTENTS_REQUES
request->haveClipDataId = TRUE;
}
if (!cliprdr_validate_file_contents_request(request))
return ERROR_BAD_ARGUMENTS;
return CHANNEL_RC_OK;
}