]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Use ap_assert instead of assert in mod_log_forensic.
authorGarrett Rooney <rooneg@apache.org>
Wed, 11 Jan 2006 04:24:19 +0000 (04:24 +0000)
committerGarrett Rooney <rooneg@apache.org>
Wed, 11 Jan 2006 04:24:19 +0000 (04:24 +0000)
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

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@367914 13f79535-47bb-0310-9956-ffa450edef68

src/modules/standard/mod_log_forensic.c

index 956e57e30b9765e6c06f07c4302496e55539a6ad..a1ec04a72e0feb7804034d8ae40c8f343cafa18c 100644 (file)
@@ -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 void log_init(server_rec *s, pool *p)
 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 @@ static char *log_escape(char *q, const char *e, const char *p)
         else
             *q++ = *p;
     }
-    assert(q < e);
+    ap_assert(q < e);
     *q = '\0';
 
     return q;
@@ -251,7 +250,7 @@ static int log_before(request_rec *r)
 
     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);