mirror of
https://github.com/reactos/wine.git
synced 2025-02-12 15:38:29 +00:00
rsaenh: Fix the case when the CPEncrypt function is asked for the needed buffer size.
This commit is contained in:
parent
4b792c6d56
commit
bf1ad6c324
@ -1889,6 +1889,12 @@ BOOL WINAPI RSAENH_CPEncrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
|
||||
}
|
||||
|
||||
dwEncryptedLen = (*pdwDataLen/pCryptKey->dwBlockLen+(Final?1:0))*pCryptKey->dwBlockLen;
|
||||
|
||||
if (pbData == NULL) {
|
||||
*pdwDataLen = dwEncryptedLen;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
for (i=*pdwDataLen; i<dwEncryptedLen && i<dwBufLen; i++) pbData[i] = dwEncryptedLen - *pdwDataLen;
|
||||
*pdwDataLen = dwEncryptedLen;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user