You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by jo...@apache.org on 2012/07/06 09:42:32 UTC

svn commit: r1358061 - in /httpd/httpd/trunk: docs/log-message-tags/next-number modules/ssl/ssl_util_ocsp.c

Author: jorton
Date: Fri Jul  6 07:42:32 2012
New Revision: 1358061

URL: http://svn.apache.org/viewvc?rev=1358061&view=rev
Log:
* modules/ssl/ssl_util_ocsp.c (get_line): Don't set line[-1] to 0
  when len == 0.

Submitted by: Jim Meyering <meyering redhat.com>

Modified:
    httpd/httpd/trunk/docs/log-message-tags/next-number
    httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c

Modified: httpd/httpd/trunk/docs/log-message-tags/next-number
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/docs/log-message-tags/next-number?rev=1358061&r1=1358060&r2=1358061&view=diff
==============================================================================
--- httpd/httpd/trunk/docs/log-message-tags/next-number (original)
+++ httpd/httpd/trunk/docs/log-message-tags/next-number Fri Jul  6 07:42:32 2012
@@ -1 +1 @@
-2321
+2322

Modified: httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c?rev=1358061&r1=1358060&r2=1358061&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_ocsp.c Fri Jul  6 07:42:32 2012
@@ -153,7 +153,13 @@ static char *get_line(apr_bucket_brigade
         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;