]> granicus.if.org Git - apache/commitdiff
Fix parsing of Content-Length in type maps
authorStefan Fritsch <sf@apache.org>
Sun, 17 Jul 2011 08:52:35 +0000 (08:52 +0000)
committerStefan Fritsch <sf@apache.org>
Sun, 17 Jul 2011 08:52:35 +0000 (08:52 +0000)
PR: 42203
Submitted by: Nagae Hidetake <nagae eagan jp>

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

CHANGES
modules/mappers/mod_negotiation.c

diff --git a/CHANGES b/CHANGES
index 408ab07b7cf975658014cb6ff536309f08575527..eab33cecbf64d6e15bb518f805560c05d65d1db7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.3.14
 
+  *) mod_negotiation: Fix parsing of Content-Length in type maps. PR 42203.
+     [Nagae Hidetake <nagae eagan jp>]
+
   *) core: Add more logging to ap_scan_script_header_err* functions. Add
      ap_scan_script_header_err*_ex functions that take a module index for
      logging.
index 101beeb27dade7b41b7586b758182b1f255fbe50..508d8f4ad85f5273ea742bf0086950711af659ee 100644 (file)
@@ -996,12 +996,13 @@ static int read_type_map(apr_file_t **map, negotiation_state *neg,
                 char *errp;
                 apr_off_t number;
 
-                if (apr_strtoff(&number, body, &errp, 10)
+                body1 = ap_get_token(neg->pool, &body, 0);
+                if (apr_strtoff(&number, body1, &errp, 10) != APR_SUCCESS
                     || *errp || number < 0) {
                     ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
                                   "Parse error in type map, Content-Length: "
                                   "'%s' in %s is invalid.",
-                                  body, r->filename);
+                                  body1, r->filename);
                     break;
                 }
                 mime_info.bytes = number;