Merge pull request #1471 from JacobBarthelmeh/Fuzzer

sanity check on buffer read
This commit is contained in:
toddouska 2018-04-04 10:31:55 -07:00 committed by GitHub
commit 960d2ec031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -11075,6 +11075,9 @@ int wc_EccPrivateKeyDecode(const byte* input, word32* inOutIdx, ecc_key* key,
if (GetMyVersion(input, inOutIdx, &version, inSz) < 0)
return ASN_PARSE_E;
if (*inOutIdx >= inSz)
return ASN_PARSE_E;
b = input[*inOutIdx];
*inOutIdx += 1;