ASF Bugzilla – Attachment 31973 Details for
Bug 56924
mod_cache segmentation fault when Content-Type has empty value
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to fix Content-Type empty value segfault
mod_cache-ctype.patch (text/plain), 1.31 KB, created by
Mark Montague
on 2014-09-08 04:52:23 UTC
(
hide
)
Description:
patch to fix Content-Type empty value segfault
Filename:
MIME Type:
Creator:
Mark Montague
Created:
2014-09-08 04:52:23 UTC
Size:
1.31 KB
patch
obsolete
>diff -up httpd-2.4.10/modules/cache/cache_util.c.fix httpd-2.4.10/modules/cache/cache_util.c >--- httpd-2.4.10/modules/cache/cache_util.c.fix 2014-09-08 00:15:50.421893456 -0400 >+++ httpd-2.4.10/modules/cache/cache_util.c 2014-09-08 00:17:41.339598981 -0400 >@@ -1258,8 +1258,10 @@ apr_table_t *cache_merge_headers_out(req > > if (r->content_type > && !apr_table_get(headers_out, "Content-Type")) { >- apr_table_setn(headers_out, "Content-Type", >- ap_make_content_type(r, r->content_type)); >+ const char *ctype = ap_make_content_type(r, r->content_type); >+ if (ctype) { >+ apr_table_setn(headers_out, "Content-Type", ctype); >+ } > } > > if (r->content_encoding >diff -up httpd-2.4.10/server/util_script.c.fix httpd-2.4.10/server/util_script.c >--- httpd-2.4.10/server/util_script.c.fix 2014-09-08 00:12:56.094505448 -0400 >+++ httpd-2.4.10/server/util_script.c 2014-09-08 00:15:28.534729354 -0400 >@@ -575,7 +575,10 @@ AP_DECLARE(int) ap_scan_script_header_er > > /* Nuke trailing whitespace */ > >- char *endp = l + strlen(l) - 1; >+ char *endp = l; >+ if (*endp != '\0') { >+ endp += strlen(l) - 1; >+ } > while (endp > l && apr_isspace(*endp)) { > *endp-- = '\0'; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 56924
:
31972
| 31973