str_len check includes any value less than 0

This commit is contained in:
Ruby Martin
2025-07-15 08:50:10 -06:00
parent dc345553df
commit 42b80878d9

View File

@@ -3549,7 +3549,7 @@ int wolfSSL_ASN1_STRING_print_ex(WOLFSSL_BIO *bio, WOLFSSL_ASN1_STRING *str,
} }
} }
if ((!err) && (str_len != -1)) { if ((!err) && (str_len >= 0)) {
/* Include any characters written for type. */ /* Include any characters written for type. */
str_len += type_len; str_len += type_len;
} }