lbarnaud Mon Nov 3 23:26:24 2008 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/sapi/cgi cgi_main.c /php-src/sapi/cli php_cli.c Log: Fixed bug #46379 (Infinite loop when parsing '#' in one line file) # PHP_5_2 only http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1298&r2=1.2027.2.547.2.1299&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1298 php-src/NEWS:1.2027.2.547.2.1299 --- php-src/NEWS:1.2027.2.547.2.1298 Mon Nov 3 20:55:01 2008 +++ php-src/NEWS Mon Nov 3 23:26:23 2008 @@ -11,6 +11,7 @@ - Fixed bug #46406 (Unregistering nodeclass throws E_FATAL). (Rob) - Fixed bug #46389 (NetWare needs small patch for _timezone). (patch by [EMAIL PROTECTED]) +- Fixed bug #46379 (Infinite loop when parsing '#' in one line file). (Arnaud) - Fixed bug #46388 (stream_notification_callback inside of object destroys object variables). (Felipe) - Fixed bug #46381 (wrong $this passed to internal methods causes segfault). http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.15.2.63&r2=1.267.2.15.2.64&diff_format=u Index: php-src/sapi/cgi/cgi_main.c diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.63 php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.64 --- php-src/sapi/cgi/cgi_main.c:1.267.2.15.2.63 Tue Oct 21 16:43:59 2008 +++ php-src/sapi/cgi/cgi_main.c Mon Nov 3 23:26:23 2008 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cgi_main.c,v 1.267.2.15.2.63 2008/10/21 16:43:59 lbarnaud Exp $ */ +/* $Id: cgi_main.c,v 1.267.2.15.2.64 2008/11/03 23:26:23 lbarnaud Exp $ */ #include "php.h" #include "php_globals.h" @@ -1964,7 +1964,7 @@ /* #!php support */ c = fgetc(file_handle.handle.fp); if (c == '#') { - while (c != '\n' && c != '\r') { + while (c != '\n' && c != '\r' && c != EOF) { c = fgetc(file_handle.handle.fp); /* skip to end of line */ } /* handle situations where line is terminated by \r\n */ http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/php_cli.c?r1=1.129.2.13.2.27&r2=1.129.2.13.2.28&diff_format=u Index: php-src/sapi/cli/php_cli.c diff -u php-src/sapi/cli/php_cli.c:1.129.2.13.2.27 php-src/sapi/cli/php_cli.c:1.129.2.13.2.28 --- php-src/sapi/cli/php_cli.c:1.129.2.13.2.27 Wed Aug 13 01:01:29 2008 +++ php-src/sapi/cli/php_cli.c Mon Nov 3 23:26:24 2008 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_cli.c,v 1.129.2.13.2.27 2008/08/13 01:01:29 jani Exp $ */ +/* $Id: php_cli.c,v 1.129.2.13.2.28 2008/11/03 23:26:24 lbarnaud Exp $ */ #include "php.h" #include "php_globals.h" @@ -562,7 +562,7 @@ /* #!php support */ c = fgetc(file_handle->handle.fp); if (c == '#') { - while (c != '\n' && c != '\r') { + while (c != '\n' && c != '\r' && c != EOF) { c = fgetc(file_handle->handle.fp); /* skip to end of line */ } /* handle situations where line is terminated by \r\n */
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php