Skip to content

Commit 4bb9075

Browse files
Fix wolfSSL_SMIME_write_PKCS7 not removing NULL characters between sections.
1 parent 1daaabf commit 4bb9075

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36134,7 +36134,7 @@ static int wolfSSL_BIO_to_MIME_crlf(WOLFSSL_BIO* in, WOLFSSL_BIO* out)
3613436134
}
3613536135

3613636136
/* remove trailing null */
36137-
if (canonLine[canonLineLen] == '\0') {
36137+
if (canonLineLen >= 1 && canonLine[canonLineLen-1] == '\0') {
3613836138
canonLineLen--;
3613936139
}
3614036140

0 commit comments

Comments
 (0)