From: akallabeth Date: Sat, 6 Feb 2021 11:40:17 +0000 (+0100) Subject: Fixed GetAttrib call X-Git-Tag: 2.3.0~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd529c826d1004989fd74291923c00e8af0cb2dd;p=platform%2Fupstream%2Ffreerdp.git Fixed GetAttrib call (cherry picked from commit 99d228251c73c3c33bc1119ceb7d084f77d80076) --- diff --git a/channels/smartcard/client/smartcard_pack.c b/channels/smartcard/client/smartcard_pack.c index 5532eb2..f54984b 100644 --- a/channels/smartcard/client/smartcard_pack.c +++ b/channels/smartcard/client/smartcard_pack.c @@ -3298,15 +3298,15 @@ LONG smartcard_unpack_set_attrib_call(SMARTCARD_DEVICE* smartcard, wStream* s, S Stream_Read_UINT32(s, call->dwAttrId); Stream_Read_UINT32(s, call->cbAttrLen); + if (!smartcard_ndr_pointer_read(s, &index, &ndrPtr)) + return ERROR_INVALID_DATA; + if ((status = smartcard_unpack_redir_scard_context_ref(smartcard, s, &(call->hContext)))) return status; if ((status = smartcard_unpack_redir_scard_handle_ref(smartcard, s, &(call->hCard)))) return status; - if (!smartcard_ndr_pointer_read(s, &index, &ndrPtr)) - return ERROR_INVALID_DATA; - if (ndrPtr) { // TODO: call->cbAttrLen was larger than the pointer value.