]> granicus.if.org Git - apache/commitdiff
* modules/ssl/ssl_util_ocsp.c (get_line): Don't set line[-1] to 0
authorJoe Orton <jorton@apache.org>
Fri, 6 Jul 2012 07:42:32 +0000 (07:42 +0000)
committerJoe Orton <jorton@apache.org>
Fri, 6 Jul 2012 07:42:32 +0000 (07:42 +0000)
  when len == 0.

Submitted by: Jim Meyering <meyering redhat.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1358061 13f79535-47bb-0310-9956-ffa450edef68

docs/log-message-tags/next-number
modules/ssl/ssl_util_ocsp.c

index f507750d3d33f5cc92f25c4a48baae49937a2b50..df39956ee90319bcacd94d5959209233d236b83f 100644 (file)
@@ -1 +1 @@
-2321
+2322
index 94ef4cd0a9c024d8412e8299ccba2c5acead8c59..e5c5e58da242db513bc8355f847c790c978a68e8 100644 (file)
@@ -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;