mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Fix for proper detection of buffer overflow case when calling wc_PKCS7_EncodeSignedData
.
This commit is contained in:
@ -2068,6 +2068,10 @@ static int PKCS7_EncodeSigned(PKCS7* pkcs7, ESD* esd,
|
|||||||
totalSz -= pkcs7->contentSz;
|
totalSz -= pkcs7->contentSz;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
/* if using single output buffer include content and footer */
|
||||||
|
totalSz += total2Sz;
|
||||||
|
}
|
||||||
|
|
||||||
if (totalSz > *outputSz) {
|
if (totalSz > *outputSz) {
|
||||||
if (pkcs7->signedAttribsSz != 0)
|
if (pkcs7->signedAttribsSz != 0)
|
||||||
|
Reference in New Issue
Block a user