DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26203>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26203

mod_usertrack default cookie name causes segmentation fault

           Summary: mod_usertrack default cookie name causes segmentation
                    fault
           Product: Apache httpd-1.3
           Version: 1.3.29
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Other mods
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


If I initialize mod_usertrack in httpd.conf with

<IfModule mod_usertrack.c>
    CookieTracking on
    CookieExpires "10 years"
</IfModule>

it uses the default COOKIE_NAME ("Apache") compiled into the application.  But 
the cookie directory record does not get completely filled out at 
initialization time, causing a segmentation violation on a NULL pointer when a 
browser connects with a cookie in the header.

The workaround is to include
    CookieName "Apache"
in the configuration file, but I have written this patch to make_cookie_dir() 
to solve the problem by initializing cdfg->regexp:

*** mod_usertrack.c.orig        Thu Oct 16 13:23:26 2003
--- mod_usertrack.c     Fri Jan 16 13:42:02 2004
***************
*** 348,353 ****
--- 348,360 ----

      dcfg = (cookie_dir_rec *) ap_pcalloc(p, sizeof(cookie_dir_rec));
      dcfg->cookie_name = COOKIE_NAME;
+
+     dcfg->regexp_string =
+               ap_pstrcat(p, "^", dcfg->cookie_name,
+                             "=([^;]+)|;[ \t]+", dcfg->cookie_name,
+                             "=([^;]+)", NULL);
+     dcfg->regexp = ap_pregcomp(p, dcfg->regexp_string, REG_EXTENDED);
+
      dcfg->cookie_domain = NULL;
      dcfg->prefix_string = "";
      dcfg->style = CT_UNSET;

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to