Fix for buffer overrun check logic.

This commit is contained in:
David Garske 2019-09-11 11:28:33 -07:00 committed by Jacob Barthelmeh
parent e6c48327c1
commit 326f02d76d

View File

@ -8061,7 +8061,7 @@ static int CheckCertSignature_ex(const byte* cert, word32 certSz, void* heap,
if (GetSequence(cert, &extIdx, &extLen, certSz) < 0) if (GetSequence(cert, &extIdx, &extLen, certSz) < 0)
ret = ASN_PARSE_E; ret = ASN_PARSE_E;
if (ret == 0 && extIdx + 1 < certSz) if (ret == 0 && (extIdx + 1) >= certSz)
ret = BUFFER_E; ret = BUFFER_E;
if (ret == 0 && if (ret == 0 &&