From: Joe Orton Date: Fri, 6 Jul 2012 07:42:32 +0000 (+0000) Subject: * modules/ssl/ssl_util_ocsp.c (get_line): Don't set line[-1] to 0 X-Git-Tag: 2.5.0-alpha~6673 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ba4b2b378f84d19f90d34def8cc2fbdb17708b1;p=thirdparty%2Fapache%2Fhttpd.git * modules/ssl/ssl_util_ocsp.c (get_line): Don't set line[-1] to 0 when len == 0. Submitted by: Jim Meyering git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1358061 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/log-message-tags/next-number b/docs/log-message-tags/next-number index f507750d3d3..df39956ee90 100644 --- a/docs/log-message-tags/next-number +++ b/docs/log-message-tags/next-number @@ -1 +1 @@ -2321 +2322 diff --git a/modules/ssl/ssl_util_ocsp.c b/modules/ssl/ssl_util_ocsp.c index 94ef4cd0a9c..e5c5e58da24 100644 --- a/modules/ssl/ssl_util_ocsp.c +++ b/modules/ssl/ssl_util_ocsp.c @@ -153,7 +153,13 @@ static char *get_line(apr_bucket_brigade *bbout, apr_bucket_brigade *bbin, return NULL; } - if (len && line[len-1] != APR_ASCII_LF) { + if (len == 0) { + ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(02321) + "empty response from OCSP server"); + return NULL; + } + + if (line[len-1] != APR_ASCII_LF) { ap_log_cerror(APLOG_MARK, APLOG_ERR, rv, c, APLOGNO(01979) "response header line too long from OCSP server"); return NULL;