diff options
author | Michael Wallner <mike@php.net> | 2005-11-02 14:38:13 +0000 |
---|---|---|
committer | Michael Wallner <mike@php.net> | 2005-11-02 14:38:13 +0000 |
commit | 496fd1c0414b7cf736304f0a3cccb2e685b70b87 (patch) | |
tree | a0225265df3ae1d549113bc5749f23798208b8c4 /main/SAPI.c | |
parent | 435b820f68d3f8840f139a4a2b0884764a86997f (diff) | |
download | php-git-496fd1c0414b7cf736304f0a3cccb2e685b70b87.tar.gz |
- sapi_header_op(SAPI_HEADER_(REPLACE|ADD), {NULL, 0, 0}) caused HTTP response splitting
- sapi_send_headers() already takes care of default_content_type (left over of fix for bug #29983)
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 94e924c626..480932fd8a 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -545,6 +545,10 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) case SAPI_HEADER_REPLACE: case SAPI_HEADER_ADD: { sapi_header_line *p = arg; + + if (!p->line || !p->line_len) { + return FAILURE; + } header_line = p->line; header_line_len = p->line_len; http_response_code = p->response_code; |