diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c index eb782d3e018..0d46fe3597f 100644 --- a/dlls/crypt32/decode.c +++ b/dlls/crypt32/decode.c @@ -475,6 +475,11 @@ static BOOL CRYPT_AsnDecodeSequence(struct AsnDecodeSequenceItem items[], cbEncoded, dwFlags, pDecodePara, pvStructInfo, *pcbStructInfo, startingPointer); + if (!cbEncoded) + { + SetLastError(CRYPT_E_ASN1_EOD); + return FALSE; + } if (pbEncoded[0] == ASN_SEQUENCE) { DWORD dataLen;