From: Christoph M. Becker Date: Sat, 26 Sep 2020 11:14:40 +0000 (+0200) Subject: Fix #80152: odbc_execute() moves internal pointer of $params X-Git-Tag: php-7.3.24RC1~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bf5f07cc8b99db53457afb87ee3e996a40a80d24;p=php Fix #80152: odbc_execute() moves internal pointer of $params As least intrusive fix, we separate the passed array argument. Closes GH-6219. --- diff --git a/NEWS b/NEWS index 923d95cd5c..a090a64eee 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ PHP NEWS . Fixed bug #80147 (BINARY strings may not be properly zero-terminated). (cmb) . Fixed bug #80150 (Failure to fetch error message). (cmb) + . Fixed bug #80152 (odbc_execute() moves internal pointer of $params). (cmb) - OPcache: . Fixed bug #80083 (Optimizer pass 6 removes variables used for ibm_db2 data diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index e26368dfeb..0722a91e34 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -1309,7 +1309,7 @@ PHP_FUNCTION(odbc_execute) int numArgs = ZEND_NUM_ARGS(), i, ne; RETCODE rc; - if (zend_parse_parameters(numArgs, "r|a", &pv_res, &pv_param_arr) == FAILURE) { + if (zend_parse_parameters(numArgs, "r|a/", &pv_res, &pv_param_arr) == FAILURE) { return; } diff --git a/ext/odbc/tests/bug80152.phpt b/ext/odbc/tests/bug80152.phpt new file mode 100644 index 0000000000..719ec3a516 --- /dev/null +++ b/ext/odbc/tests/bug80152.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #80152 (odbc_execute() moves internal pointer of $params) +--SKIPIF-- + +--FILE-- + +--CLEAN-- + +--EXPECT-- +int(0) +int(0)