crypt32: Check for and fail on indefinite-length encoding.

This commit is contained in:
Juan Lang 2007-07-23 15:30:20 -07:00 committed by Alexandre Julliard
parent dc28f99d22
commit 45652e0802
1 changed files with 6 additions and 0 deletions

View File

@ -193,6 +193,12 @@ static BOOL WINAPI CRYPT_GetLen(const BYTE *pbEncoded, DWORD cbEncoded,
ret = TRUE;
}
}
else if (pbEncoded[1] == 0x80)
{
FIXME("unimplemented for indefinite-length encoding\n");
SetLastError(CRYPT_E_ASN1_CORRUPT);
ret = FALSE;
}
else
{
BYTE lenLen = GET_LEN_BYTES(pbEncoded[1]);