Don't accept 0-length ASN.1 integers for decoding
This commit is contained in:
parent
9c413abee1
commit
3fb7bd92cc
@ -1020,7 +1020,7 @@ static size_t WinPrAsn1DecReadIntegerLike(WinPrAsn1Decoder* dec, WinPrAsn1_tag e
|
||||
size_t ret = readTagAndLen(dec, &dec->source, &tag, &len);
|
||||
if (!ret || (tag != expectedTag))
|
||||
return 0;
|
||||
if (!Stream_CheckAndLogRequiredLength(TAG, &dec->source, len) || (len > 4))
|
||||
if (len == 0 || !Stream_CheckAndLogRequiredLength(TAG, &dec->source, len) || (len > 4))
|
||||
return 0;
|
||||
|
||||
WinPrAsn1_INTEGER val = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user