crypt32: Don't write to pvStructInfo if it's NULL.

This commit is contained in:
Huw Davies 2008-08-20 11:21:24 +01:00 committed by Alexandre Julliard
parent ac5c7d22d0
commit 3b306c8d6e

View file

@ -3942,7 +3942,9 @@ static BOOL WINAPI CRYPT_AsnDecodeSequenceOfAny(DWORD dwCertEncodingType,
BYTE *nextPtr;
DWORD i;
if ((ret = CRYPT_DecodeEnsureSpace(dwFlags, pDecodePara,
if (!pvStructInfo)
*pcbStructInfo = bytesNeeded;
else if ((ret = CRYPT_DecodeEnsureSpace(dwFlags, pDecodePara,
pvStructInfo, pcbStructInfo, bytesNeeded)))
{
if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)