You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2001/08/21 14:46:00 UTC

cvs commit: apache-1.3/src/modules/standard mod_mime_magic.c

trawick     01/08/21 05:46:00

  Modified:    src      CHANGES
               src/modules/standard mod_mime_magic.c
  Log:
  Fix a storage leak in mod_mime_magic.  The strdup() call when processing
  a request should have been an ap_pstrdup() call.
  
  Revision  Changes    Path
  1.1699    +3 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.1698
  retrieving revision 1.1699
  diff -u -r1.1698 -r1.1699
  --- CHANGES	2001/08/16 01:50:23	1.1698
  +++ CHANGES	2001/08/21 12:45:59	1.1699
  @@ -1,5 +1,8 @@
   Changes with Apache 1.3.21
   
  +  *) Fix a storage leak (a strdup() call) in mod_mime_magic.  
  +     [Jeff Trawick]
  +
     *) We have always used the obsolete/deprecated Netscape syntax
        for our tracking cookies; now the CookieStyle directive
        allows the Webmaster to choose the Netscape, RFC2109, or
  
  
  
  1.43      +1 -1      apache-1.3/src/modules/standard/mod_mime_magic.c
  
  Index: mod_mime_magic.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_mime_magic.c,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- mod_mime_magic.c	2001/01/15 17:05:46	1.42
  +++ mod_mime_magic.c	2001/08/21 12:46:00	1.43
  @@ -623,7 +623,7 @@
       va_end(ap);
   
       /* add the buffer to the list */
  -    return magic_rsl_add(r, strdup(buf));
  +    return magic_rsl_add(r, ap_pstrdup(r->pool, buf));
   }
   
   /* RSL hook for putchar-type functions */