rsaenh: Ensure a PKCS1 data block has at least minimum length.

This commit is contained in:
Juan Lang 2012-02-01 10:19:48 -08:00 committed by Alexandre Julliard
parent ed04a730f9
commit 373e472db9

View File

@ -1697,6 +1697,11 @@ static BOOL unpad_data(CONST BYTE *abData, DWORD dwDataLen, BYTE *abBuffer, DWOR
{
DWORD i;
if (dwDataLen < 3)
{
SetLastError(NTE_BAD_DATA);
return FALSE;
}
for (i=2; i<dwDataLen; i++)
if (!abData[i])
break;