httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r499567 - /httpd/httpd/trunk/modules/metadata/mod_headers.c
Date Wed, 24 Jan 2007 21:08:45 GMT
Author: rpluem
Date: Wed Jan 24 13:08:44 2007
New Revision: 499567

URL: http://svn.apache.org/viewvc?view=rev&rev=499567
Log:
* Fix a off-by-one error in parse_format_tag in the case that the last character
  of the string to which *sa points is a %. In this case the while loop in
  parse_format_string would call parse_format_tag with a pointer to a memory
  region that starts one byte after the string to which s in parse_format_string
  points to.

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

Modified: httpd/httpd/trunk/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/metadata/mod_headers.c?view=diff&rev=499567&r1=499566&r2=499567
==============================================================================
--- httpd/httpd/trunk/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/trunk/modules/metadata/mod_headers.c Wed Jan 24 13:08:44 2007
@@ -309,7 +309,9 @@
     if ((*s == '%') || (*s == '\0')) {
         tag->func = constant_item;
         tag->arg = "%";
-        *sa = ++s;
+        if (*s)
+            s++;
+        *sa = s;
         return NULL;
     }
 



Mime
View raw message