You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by nd...@apache.org on 2004/04/04 01:22:19 UTC

cvs commit: httpd-2.0/modules/metadata mod_expires.c

nd          2004/04/03 15:22:19

  Modified:    .        CHANGES
               modules/metadata mod_expires.c
  Log:
  fix segfault, which occurs if no CT is set and wildcards are used.
  
  PR: 28047
  
  Revision  Changes    Path
  1.1446    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1445
  retrieving revision 1.1446
  diff -u -u -r1.1445 -r1.1446
  --- CHANGES	3 Apr 2004 20:50:00 -0000	1.1445
  +++ CHANGES	3 Apr 2004 23:22:18 -0000	1.1446
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) Fix segfault in mod_expires, which occured under certain
  +     circumstances. PR 28047.  [Andr� Malo]
  +
     *) mod_logio no longer removes the EOS bucket. PR 27928.
        [Bojan Smojver <bojan rexursive.com>]
   
  
  
  
  1.54      +1 -1      httpd-2.0/modules/metadata/mod_expires.c
  
  Index: mod_expires.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_expires.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -u -r1.53 -r1.54
  --- mod_expires.c	9 Feb 2004 20:29:21 -0000	1.53
  +++ mod_expires.c	3 Apr 2004 23:22:18 -0000	1.54
  @@ -482,7 +482,7 @@
                   char *checkmime;
                   char *spos;
                   checkmime = apr_pstrdup(r->pool, r->content_type);
  -                spos = strchr(checkmime, '/');
  +                spos = checkmime ? ap_strchr(checkmime, '/') : NULL;
                   if (spos != NULL) {
                       /*
                        * Without a '/' character, nothing we have will match.