httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jaillet...@apache.org
Subject svn commit: r1491700 - /httpd/httpd/trunk/modules/metadata/mod_mime_magic.c
Date Tue, 11 Jun 2013 07:41:41 GMT
Author: jailletc36
Date: Tue Jun 11 07:41:40 2013
New Revision: 1491700

URL: http://svn.apache.org/r1491700
Log:
According to comment in 'magic_rsl_add' and to the way 'magic_rsl_printf' manages its buffer,
I think that this memory should be apr_pstrdup'ed.

This has been like that forever, but seems broken to me.

Untested.

Modified:
    httpd/httpd/trunk/modules/metadata/mod_mime_magic.c

Modified: httpd/httpd/trunk/modules/metadata/mod_mime_magic.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_mime_magic.c?rev=1491700&r1=1491699&r2=1491700&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_mime_magic.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_mime_magic.c Tue Jun 11 07:41:40 2013
@@ -606,7 +606,7 @@ static int magic_rsl_putchar(request_rec
     /* high overhead for 1 char - just hope they don't do this much */
     str[0] = c;
     str[1] = '\0';
-    return magic_rsl_add(r, str);
+    return magic_rsl_add(r, apr_pstrdup(r->pool, str));
 }
 
 /* allocate and copy a contiguous string from a result string list */



Mime
View raw message