mirror of
https://github.com/reactos/wine.git
synced 2025-02-18 03:48:01 +00:00
Avoid segfault when detecting decryption buffer size.
This commit is contained in:
parent
dc920056b1
commit
ea2fabca84
@ -1834,7 +1834,7 @@ BOOL WINAPI RSAENH_CPEncrypt(HCRYPTPROV hProv, HCRYPTKEY hKey, HCRYPTHASH hHash,
|
||||
}
|
||||
|
||||
dwEncryptedLen = (*pdwDataLen/pCryptKey->dwBlockLen+(Final?1:0))*pCryptKey->dwBlockLen;
|
||||
for (i=*pdwDataLen; i<dwEncryptedLen; i++) pbData[i] = dwEncryptedLen - *pdwDataLen;
|
||||
for (i=*pdwDataLen; i<dwEncryptedLen && i<dwBufLen; i++) pbData[i] = dwEncryptedLen - *pdwDataLen;
|
||||
*pdwDataLen = dwEncryptedLen;
|
||||
|
||||
if (*pdwDataLen > dwBufLen)
|
||||
|
Loading…
x
Reference in New Issue
Block a user