]> granicus.if.org Git - php/commitdiff
fix bug #36017 (fopen() crashes PHP when opening a URL)
authorAntony Dovgal <tony2001@php.net>
Sun, 15 Jan 2006 22:01:47 +0000 (22:01 +0000)
committerAntony Dovgal <tony2001@php.net>
Sun, 15 Jan 2006 22:01:47 +0000 (22:01 +0000)
+ fix incosistency in macro usage

NEWS
ext/standard/http_fopen_wrapper.c

diff --git a/NEWS b/NEWS
index 6660da72cf285ced52882ed939180f3ebf5db660..fe5d34adf9d57088949289630528098016f61fd4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,8 @@ PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2006, Version 4.4.3
 - Added a check for special characters in the session name. (Ilia)
-       
+- Fixed bug #36017 (fopen() crashes PHP when opening a URL). (Tony)
+
 13 Jan 2006, Version 4.4.2
 - Added missing safe_mode/open_basedir checks into cURL extension. (Ilia)
 - Backported missing imap_mailcompose() fixes from PHP 5.x. (Ilia)
index da46645721448e1aa2fc5e7d1731a3863e069c4f..30436777dbd98df61a336e2810cf31a4ab881e4c 100644 (file)
@@ -339,7 +339,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
                size_t tmp_line_len;
                /* get response header */
 
-               if (_php_stream_get_line(stream, tmp_line, sizeof(tmp_line) - 1, &tmp_line_len TSRMLS_CC) != NULL) {
+               if (php_stream_get_line(stream, tmp_line, sizeof(tmp_line) - 1, &tmp_line_len) != NULL) {
                        zval *http_response;
                        int response_code;
 
@@ -394,7 +394,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
 
        while (!body && !php_stream_eof(stream)) {
                size_t http_header_line_length;
-               if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length TSRMLS_CC) && *http_header_line != '\n' && *http_header_line != '\r') {
+               if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length) && *http_header_line != '\n' && *http_header_line != '\r') {
                        char *e = http_header_line + http_header_line_length - 1;
                        while (*e == '\n' || *e == '\r') {
                                e--;