git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103763
13f79535-47bb-0310-9956-
ffa450edef68
cl = apr_table_get(r->headers_out, "Content-Length");
}
if (cl) {
- size = apr_atoi64(cl);
+ char *errp;
+ if (apr_strtoff(&size, cl, &errp, 10) || *errp || size < 0) {
+ cl = NULL; /* parse error, see next 'if' block */
+ }
}
- else {
+
+ if (!cl) {
/* if we don't get the content-length, see if we have all the
* buckets and use their length to calculate the size
*/