andrey Sat May 7 03:47:25 2005 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mysqli mysqli_api.c Log: bail out just after detecting incorrect number of paramts to bind (MFH) http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.87.2.16&r2=1.87.2.17&ty=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.87.2.16 php-src/ext/mysqli/mysqli_api.c:1.87.2.17 --- php-src/ext/mysqli/mysqli_api.c:1.87.2.16 Fri May 6 06:15:07 2005 +++ php-src/ext/mysqli/mysqli_api.c Sat May 7 03:47:24 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.87.2.16 2005/05/06 10:15:07 andrey Exp $ + $Id: mysqli_api.c,v 1.87.2.17 2005/05/07 07:47:24 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -109,12 +109,13 @@ start = 1; } - if (strlen(types) != argc - start) { + if (typelen != argc - start) { /* number of bind variables doesn't match number of elements in type definition string */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of elements in type definition string doesn't match number of bind variables"); + RETURN_FALSE; } - if (argc - start != stmt->stmt->param_count) { + if (typelen != stmt->stmt->param_count) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Number of variables doesn't match number of parameters in prepared statement"); RETURN_FALSE; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php