Commit 501bad24 authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

Fix parsing of Content-Length in type maps

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
parent 450813c7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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.
+3 −2
Original line number Diff line number Diff line
@@ -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;