From: Garrett Rooney Date: Wed, 11 Jan 2006 04:24:19 +0000 (+0000) Subject: Use ap_assert instead of assert in mod_log_forensic. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04c42d7147552d63e8cef2015f70f78840897ac6;p=thirdparty%2Fapache%2Fhttpd.git 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 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 --- diff --git a/src/modules/standard/mod_log_forensic.c b/src/modules/standard/mod_log_forensic.c index 956e57e30b9..a1ec04a72e0 100644 --- a/src/modules/standard/mod_log_forensic.c +++ b/src/modules/standard/mod_log_forensic.c @@ -28,7 +28,6 @@ #include "httpd.h" #include "http_config.h" #include "http_log.h" -#include #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);