diff --git a/channels/cliprdr/cliprdr_common.c b/channels/cliprdr/cliprdr_common.c index 9a099423f..ebe0d6aad 100644 --- a/channels/cliprdr/cliprdr_common.c +++ b/channels/cliprdr/cliprdr_common.c @@ -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; }