iliaa Wed Dec 7 22:25:23 2005 EDT
Modified files: (Branch: PHP_5_1)
/php-src NEWS
/php-src/ext/standard basic_functions.c
Log:
Fixed bug #35594 (Multiple calls to getopt() may result in a crash).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.2027.2.279&r2=1.2027.2.280&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.279 php-src/NEWS:1.2027.2.280
--- php-src/NEWS:1.2027.2.279 Wed Dec 7 21:53:06 2005
+++ php-src/NEWS Wed Dec 7 22:25:21 2005
@@ -23,6 +23,8 @@
- Fixed many bugs in OCI8. (Tony)
- Fixed crash and leak in mysqli when using 4.1.x client libraries and
connecting to 5.x server. (Andrey)
+- Fixed bug #35594 (Multiple calls to getopt() may result in a crash).
+ (rabbitt at gmail dot com, Ilia)
- Fixed bug #35558 (mktime() interpreting 3 digit years incorrectly). (Ilia)
- Fixed bug #35543 (php crash when calling non existing method of a class
that extends PDO). (Tony)
http://cvs.php.net/diff.php/php-src/ext/standard/basic_functions.c?r1=1.725.2.12&r2=1.725.2.13&ty=u
Index: php-src/ext/standard/basic_functions.c
diff -u php-src/ext/standard/basic_functions.c:1.725.2.12
php-src/ext/standard/basic_functions.c:1.725.2.13
--- php-src/ext/standard/basic_functions.c:1.725.2.12 Wed Dec 7 12:36:17 2005
+++ php-src/ext/standard/basic_functions.c Wed Dec 7 22:25:22 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: basic_functions.c,v 1.725.2.12 2005/12/07 17:36:17 iliaa Exp $ */
+/* $Id: basic_functions.c,v 1.725.2.13 2005/12/08 03:25:22 iliaa Exp $ */
#include "php.h"
#include "php_streams.h"
@@ -1665,6 +1665,9 @@
/* Disable getopt()'s error messages. */
opterr = 0;
+ /* Force reinitialization of getopt() (via optind reset) on every call.
*/
+ optind = 0;
+
/* Invoke getopt(3) on the argument array. */
#ifdef HARTMUT_0
while ((o = getopt_long(argc, argv, options, longopts, &longindex)) !=
-1) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php