From: Jim Jagielski Date: Fri, 27 Aug 2004 23:49:39 +0000 (+0000) Subject: Fix mod_log_forensic bug by applying patch. reported *was* author X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02b5ce366ac3beb79439f98c9cededaef5efc663;p=thirdparty%2Fapache%2Fhttpd.git Fix mod_log_forensic bug by applying patch. reported *was* author of patch, right?? PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@104872 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/CHANGES b/src/CHANGES index de864cdc857..76304db174b 100644 --- a/src/CHANGES +++ b/src/CHANGES @@ -1,5 +1,9 @@ Changes with Apache 1.3.32 + *) Fix trivial bug in mod_log_forensic that caused the child + to seg fault when certain invalid requests were fired at it with + forensic logging is enabled. [Will Slater ] + *) Fix memory leak in the cache handling of mod_rewrite. PR 27862. [chunyan sheng , André Malo] diff --git a/src/modules/standard/mod_log_forensic.c b/src/modules/standard/mod_log_forensic.c index 4fc7ac772dd..56cf33d5339 100644 --- a/src/modules/standard/mod_log_forensic.c +++ b/src/modules/standard/mod_log_forensic.c @@ -233,6 +233,10 @@ static int log_after(request_rec *r) return DECLINED; rcfg = ap_get_module_config(r->request_config, &log_forensic_module); + + if (!rcfg) + return DECLINED; + s = ap_pstrcat(r->pool, "-", rcfg->id, "\n", NULL); write(cfg->fd, s, strlen(s));