johannes Mon Jan 12 14:04:32 2009 UTC Added files: (Branch: PHP_5_3) /php-src/ext/mysqli/tests bug47050.phpt
Modified files: /php-src NEWS /php-src/ext/mysqli mysqli_fe.c Log: MFH: Fix #47050 mysqli_poll() modifies improper variables http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.444&r2=1.2027.2.547.2.965.2.445&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.965.2.444 php-src/NEWS:1.2027.2.547.2.965.2.445 --- php-src/NEWS:1.2027.2.547.2.965.2.444 Mon Jan 12 12:56:01 2009 +++ php-src/NEWS Mon Jan 12 14:04:31 2009 @@ -27,6 +27,7 @@ - Added ICU support to SQLite3 when using the bundled version. (Scott) - Enabled the salsa hashing functions. (Scott) +- Fixed bug #47050 (mysqli_poll() modifies improper variables). (Johannes) - Fixed bug #46957 (The tokenizer returns deprecated values). (Felipe) - Fixed bug #46944 (UTF-8 characters outside the BMP aren't encoded correctly). (Scott) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli_fe.c?r1=1.49.2.5.2.1.2.12&r2=1.49.2.5.2.1.2.13&diff_format=u Index: php-src/ext/mysqli/mysqli_fe.c diff -u php-src/ext/mysqli/mysqli_fe.c:1.49.2.5.2.1.2.12 php-src/ext/mysqli/mysqli_fe.c:1.49.2.5.2.1.2.13 --- php-src/ext/mysqli/mysqli_fe.c:1.49.2.5.2.1.2.12 Wed Dec 31 11:15:39 2008 +++ php-src/ext/mysqli/mysqli_fe.c Mon Jan 12 14:04:32 2009 @@ -15,7 +15,7 @@ | Author: Georg Richter <ge...@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_fe.c,v 1.49.2.5.2.1.2.12 2008/12/31 11:15:39 sebastian Exp $ + $Id: mysqli_fe.c,v 1.49.2.5.2.1.2.13 2009/01/12 14:04:32 johannes Exp $ */ #ifdef HAVE_CONFIG_H @@ -42,6 +42,13 @@ ZEND_BEGIN_ARG_INFO(all_args_force_by_ref, 1) ZEND_END_ARG_INFO(); +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_poll, 0, 0, 4) + ZEND_ARG_ARRAY_INFO(1, read, 1) + ZEND_ARG_ARRAY_INFO(1, write, 1) + ZEND_ARG_ARRAY_INFO(1, error, 1) + ZEND_ARG_INFO(0, sec) + ZEND_ARG_INFO(0, usec) +ZEND_END_ARG_INFO(); /* {{{ mysqli_functions[] * @@ -114,7 +121,7 @@ PHP_FE(mysqli_options, NULL) PHP_FE(mysqli_ping, NULL) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_poll, NULL) + PHP_FE(mysqli_poll, arginfo_mysqli_poll) #endif PHP_FE(mysqli_prepare, NULL) PHP_FE(mysqli_report, NULL) http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/tests/bug47050.phpt?view=markup&rev=1.1 Index: php-src/ext/mysqli/tests/bug47050.phpt +++ php-src/ext/mysqli/tests/bug47050.phpt --TEST-- Bug #47050 (mysqli_poll() modifies improper variables) --SKIPIF-- <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- <?php include ("connect.inc"); $link1 = mysqli_connect($host, $user, $passwd, null, $port, $socket); mysqli_select_db($link1, $db); $link1->query("SELECT 'test'", MYSQLI_ASYNC); $all_links = array($link1); $links = $errors = $reject = $all_links; mysqli_poll($links, $errors, $reject, 1); echo "links: ", sizeof($links), "\n"; echo "errors: ", sizeof($errors), "\n"; echo "reject: ", sizeof($reject), "\n"; echo "all_links: ", sizeof($all_links), "\n"; $link1->close(); ?> --EXPECT-- links: 1 errors: 0 reject: 0 all_links: 1 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php