From: Giovanni Bechis Date: Tue, 6 Jun 2023 22:41:27 +0000 (+0000) Subject: log an error if BIO_write(3) fails X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d78beeb015d2b8b478c14893549d8bb0ab7e6823;p=thirdparty%2Fapache%2Fhttpd.git log an error if BIO_write(3) fails git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910269 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index 22138604e1b..e73dda0faec 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -10455 +10456 diff --git a/modules/ssl/ssl_util_ocsp.c b/modules/ssl/ssl_util_ocsp.c index fbbec07acc6..855f02fc216 100644 --- a/modules/ssl/ssl_util_ocsp.c +++ b/modules/ssl/ssl_util_ocsp.c @@ -287,7 +287,10 @@ static OCSP_RESPONSE *read_response(apr_socket_t *sd, BIO *bio, conn_rec *c, "OCSP response: got %" APR_SIZE_T_FMT " bytes, %" APR_SIZE_T_FMT " total", len, count); - BIO_write(bio, data, (int)len); + if(BIO_write(bio, data, (int)len) < 0) { + ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(10455) + "failed to write OCSP response to BIO buffer"); + } apr_bucket_delete(e); }