mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Merge pull request #2109 from dgarske/pkcs7_buf
Fix for proper detection of PKCS7 buffer overflow case
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user