You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ro...@apache.org on 2006/01/11 05:24:20 UTC

svn commit: r367914 - /httpd/httpd/branches/1.3.x/src/modules/standard/mod_log_forensic.c

Author: rooneg
Date: Tue Jan 10 20:24:19 2006
New Revision: 367914

URL: http://svn.apache.org/viewcvs?rev=367914&view=rev
Log:
Use ap_assert instead of assert in mod_log_forensic.

This fixes issue #38177.

* src/modules/standard/mod_log_forensic.c
  (log_escape, log_before): s/assert/ap_assert/

Noticed by: Wilson Cheung <wcheung ucsd.edu>
Patch by: Jim Jagielski
Approved by: Jeff Trawick, André Malo

Modified:
    httpd/httpd/branches/1.3.x/src/modules/standard/mod_log_forensic.c

Modified: httpd/httpd/branches/1.3.x/src/modules/standard/mod_log_forensic.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/1.3.x/src/modules/standard/mod_log_forensic.c?rev=367914&r1=367913&r2=367914&view=diff
==============================================================================
--- httpd/httpd/branches/1.3.x/src/modules/standard/mod_log_forensic.c (original)
+++ httpd/httpd/branches/1.3.x/src/modules/standard/mod_log_forensic.c Tue Jan 10 20:24:19 2006
@@ -28,7 +28,6 @@
 #include "httpd.h"
 #include "http_config.h"
 #include "http_log.h"
-#include <assert.h>
 #include "multithread.h"
 
 #ifdef NETWARE
@@ -162,9 +161,9 @@
 static char *log_escape(char *q, const char *e, const char *p)
 {
     for ( ; *p ; ++p) {
-        assert(q < e);
+        ap_assert(q < e);
         if (test_char_table[*(unsigned char *)p]&T_ESCAPE_FORENSIC) {
-            assert(q+2 < e);
+            ap_assert(q+2 < e);
             *q++ = '%';
             sprintf(q, "%02x", *(unsigned char *)p);
             q += 2;
@@ -172,7 +171,7 @@
         else
             *q++ = *p;
     }
-    assert(q < e);
+    ap_assert(q < e);
     *q = '\0';
 
     return q;
@@ -251,7 +250,7 @@
 
     ap_table_do(log_headers, &h, r->headers_in, NULL);
 
-    assert(h.pos < h.end);
+    ap_assert(h.pos < h.end);
     *h.pos++ = '\n';
 
     write(cfg->fd, h.log, h.count-1);