]> granicus.if.org Git - apache/commitdiff
Fix a segfault in mod_include when the original request has no
authorJeff Trawick <trawick@apache.org>
Wed, 22 Aug 2001 12:07:40 +0000 (12:07 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 22 Aug 2001 12:07:40 +0000 (12:07 +0000)
associated filename (e.g., we're filtering the error document for
a bad URI).

Reported by: Joshua Slive

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90486 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/mod_include.c

diff --git a/CHANGES b/CHANGES
index 71fa7705b3797f07ca27f45d11ff0318bcc9df5a..67acc9021e83bc53ea121a420a395f72782a1def 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,9 @@
 Changes with Apache 2.0.25-dev
 
+  *) Fix a segfault in mod_include when the original request has no
+     associated filename (e.g., we're filtering the error document for
+     a bad URI).  [Jeff Trawick]
+
   *) Fix a storage leak (a strdup() call) in mod_mime_magic.  [Jeff Trawick]
 
   *) The prefork and OS/2 MPMs are overwriting the pid file when a second copy
index 0dad62053686a994475a3c7e37d7353c2f8da872..b65a50ba10d1c576b664610ebcdf4c55fc63d4f0 100644 (file)
@@ -832,8 +832,8 @@ static int handle_include(include_ctx_t *ctx, apr_bucket_brigade **bb, request_r
                     for (p = r; p != NULL && !founddupe; p = p->main) {
                    request_rec *q;
                    for (q = p; q != NULL; q = q->prev) {
-                       if ( (strcmp(q->filename, rr->filename) == 0) ||
-                            (strcmp(q->uri, rr->uri) == 0) ){
+                       if ((q->filename && rr->filename && (strcmp(q->filename, rr->filename) == 0)) ||
+                            (strcmp(q->uri, rr->uri) == 0){
                            founddupe = 1;
                            break;
                        }