]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
According to comment in 'magic_rsl_add' and to the way 'magic_rsl_printf' manages...
authorChristophe Jaillet <jailletc36@apache.org>
Tue, 11 Jun 2013 07:41:40 +0000 (07:41 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Tue, 11 Jun 2013 07:41:40 +0000 (07:41 +0000)
This has been like that forever, but seems broken to me.

Untested.

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

modules/metadata/mod_mime_magic.c

index 03226aca5edfbcc015fe7970f1ead0407a1dca21..80c585da9cb19bbb06d6c30480c820156212e837 100644 (file)
@@ -606,7 +606,7 @@ static int magic_rsl_putchar(request_rec *r, char c)
     /* 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 */