[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ http_fopen_wrapper.c

2011-11-08 Thread Antony Dovgal
tony2001 Tue, 08 Nov 2011 13:30:58 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=318911

Log:
bail out if reading HTTP headers failed

Changed paths:
U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2011-11-08 12:34:37 UTC 
(rev 318910)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2011-11-08 13:30:58 UTC 
(rev 318911)
@@ -716,7 +716,10 @@
char *e = http_header_line + http_header_line_length - 
1;
if (*e != '\n') {
do { /* partial header */
-   php_stream_get_line(stream, 
http_header_line, HTTP_HEADER_BLOCK_SIZE, http_header_line_length);
+   if (php_stream_get_line(stream, 
http_header_line, HTTP_HEADER_BLOCK_SIZE, http_header_line_length) == NULL) {
+   
php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, Failed to read HTTP 
headers);
+   goto out;
+   }
e = http_header_line + 
http_header_line_length - 1;
} while (*e != '\n');
continue;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/standard/ http_fopen_wrapper.c

2009-12-10 Thread Felipe Pena
felipe   Thu, 10 Dec 2009 10:46:33 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291944

Log:
- Fix build

Changed paths:
U   php/php-src/trunk/ext/standard/http_fopen_wrapper.c

Modified: php/php-src/trunk/ext/standard/http_fopen_wrapper.c
===
--- php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2009-12-10 10:38:46 UTC 
(rev 291943)
+++ php/php-src/trunk/ext/standard/http_fopen_wrapper.c 2009-12-10 10:46:33 UTC 
(rev 291944)
@@ -654,7 +654,7 @@
if (php_stream_get_line(stream, ZSTR(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;
if (*e != '\n') { /* partial header */
-   php_stream_get_line(stream, http_header_line, 
HTTP_HEADER_BLOCK_SIZE, http_header_line_length);
+   php_stream_get_line(stream, 
ZSTR(http_header_line), HTTP_HEADER_BLOCK_SIZE, http_header_line_length);
continue;
}
while (*e == '\n' || *e == '\r') {

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php