From 0d4e72afe98aa7fa6f7761c9960509278e28233a Mon Sep 17 00:00:00 2001 From: kenjiro <> Date: Fri, 17 Jul 2026 12:41:52 +0000 Subject: Remove redundant BIO_write() length assertions in b64_write() b64_write() asserted that BIO_write() does not return more bytes than requested in two places. Other BIO_write() call sites do not make this check, and there is no special handling here that depends on asserting this condition. ok tb@ beck@ joshua@ --- src/lib/libcrypto/evp/bio_b64.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index 32cd1f06df..61a26df868 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bio_b64.c,v 1.29 2024/04/09 13:52:41 beck Exp $ */ +/* $OpenBSD: bio_b64.c,v 1.30 2026/07/17 12:41:52 kenjiro Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -380,7 +380,6 @@ b64_write(BIO *b, const char *in, int inl) BIO_copy_next_retry(b); return (i); } - OPENSSL_assert(i <= n); ctx->buf_off += i; OPENSSL_assert(ctx->buf_off <= (int)sizeof(ctx->buf)); OPENSSL_assert(ctx->buf_len >= ctx->buf_off); @@ -453,7 +452,6 @@ b64_write(BIO *b, const char *in, int inl) BIO_copy_next_retry(b); return ((ret == 0) ? i : ret); } - OPENSSL_assert(i <= n); n -= i; ctx->buf_off += i; OPENSSL_assert(ctx->buf_off <= (int)sizeof(ctx->buf)); -- cgit v1.2.3-55-g6feb