Merge pull request #2109 from dgarske/pkcs7_buf

Fix for proper detection of PKCS7 buffer overflow case
This commit is contained in:
toddouska
2019-02-25 13:02:09 -08:00
committed by GitHub

View File

@ -2068,6 +2068,10 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
totalSz -= pkcs7->contentSz;
}
}
else {
/* if using single output buffer include content and footer */
totalSz += total2Sz;
}
if (totalSz > *outputSz) {
if (pkcs7->signedAttribsSz != 0)