Merge pull request #5112 from JacobBarthelmeh/Testing

fix for indef buffer check with pkcs7
This commit is contained in:
Sean Parkinson
2022-05-09 09:03:10 +10:00
committed by GitHub

View File

@ -360,7 +360,7 @@ static int wc_PKCS7_SetMaxStream(PKCS7* pkcs7, byte* in, word32 defSz)
#ifdef ASN_BER_TO_DER #ifdef ASN_BER_TO_DER
if (length == 0 && ret == 0) { if (length == 0 && ret == 0) {
idx = 0; idx = 0;
if ((ret = wc_BerToDer(pt, defSz, NULL, if ((ret = wc_BerToDer(pt, maxIdx, NULL,
(word32*)&length)) != LENGTH_ONLY_E) { (word32*)&length)) != LENGTH_ONLY_E) {
return ret; return ret;
} }