Fixed GetAttrib return length
This commit is contained in:
parent
b0c11ebd91
commit
14d5ad0d79
@ -383,14 +383,10 @@ static LONG smartcard_ListReaderGroupsA_Call(SMARTCARD_DEVICE* smartcard,
|
||||
DWORD cchGroups = 0;
|
||||
IRP* irp = operation->irp;
|
||||
cchGroups = SCARD_AUTOALLOCATE;
|
||||
status = ret.ReturnCode =
|
||||
SCardListReaderGroupsA(operation->hContext, (LPSTR)&mszGroups, &cchGroups);
|
||||
ret.ReturnCode = SCardListReaderGroupsA(operation->hContext, (LPSTR)&mszGroups, &cchGroups);
|
||||
ret.msz = (BYTE*)mszGroups;
|
||||
ret.cBytes = cchGroups;
|
||||
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
return status;
|
||||
|
||||
status = smartcard_pack_list_reader_groups_return(smartcard, irp->output, &ret, FALSE);
|
||||
|
||||
if (status != SCARD_S_SUCCESS)
|
||||
|
@ -2802,6 +2802,8 @@ LONG smartcard_pack_get_attrib_return(SMARTCARD_DEVICE* smartcard, wStream* s,
|
||||
return SCARD_F_INTERNAL_ERROR;
|
||||
|
||||
cbAttrLen = ret->cbAttrLen;
|
||||
if (ret->ReturnCode == SCARD_E_INSUFFICIENT_BUFFER)
|
||||
cbAttrLen = 0;
|
||||
if (cbAttrLen == SCARD_AUTOALLOCATE)
|
||||
cbAttrLen = 0;
|
||||
Stream_Write_UINT32(s, cbAttrLen); /* cbAttrLen (4 bytes) */
|
||||
|
Loading…
x
Reference in New Issue
Block a user