Merge pull request #6642 from kareem-wolfssl/zd16073

Fix wolfSSL_SMIME_write_PKCS7 not removing NULL characters between sections.
This commit is contained in:
JacobBarthelmeh
2023-07-21 16:52:38 -06:00
committed by GitHub

View File

@ -36134,7 +36134,7 @@ static int wolfSSL_BIO_to_MIME_crlf(WOLFSSL_BIO* in, WOLFSSL_BIO* out)
}
/* remove trailing null */
if (canonLine[canonLineLen] == '\0') {
if (canonLineLen >= 1 && canonLine[canonLineLen-1] == '\0') {
canonLineLen--;
}