From 8df8e4a87ac723de0a655c02ef2be57f9505f5fc Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Tue, 31 Mar 2026 14:47:19 -0600 Subject: [PATCH] prevent out of bounds read in loadX509orX509REQFromPemBio() --- src/x509.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x509.c b/src/x509.c index 8fc8edc57b6..77e365af461 100644 --- a/src/x509.c +++ b/src/x509.c @@ -13192,7 +13192,7 @@ static WOLFSSL_X509 *loadX509orX509REQFromPemBio(WOLFSSL_BIO *bp, pem = newPem; pemSz = newSz; } - else if (i > pemSz) { + else if (i >= pemSz) { /* Buffer full for non-streaming source - this shouldn't happen */ break; }