forked from php/php-src
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #74625 (Integer overflow in oci_bind_array_by_name).
- Loading branch information
Showing
3 changed files
with
46 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--TEST-- | ||
Bug #74625 (Integer overflow in oci_bind_array_by_name) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('oci8')) die ("skip no oci8 extension"); | ||
if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); | ||
?> | ||
--FILE-- | ||
<?php | ||
|
||
require(dirname(__FILE__).'/connect.inc'); | ||
|
||
$s = oci_parse($c, "BEGIN | ||
SELECT -1 BULK COLLECT INTO :a FROM DUAL; | ||
END;"); | ||
oci_bind_array_by_name($s, ':a', $a, 5000, 10, SQLT_INT); | ||
oci_execute($s); | ||
|
||
var_dump($a); | ||
?> | ||
===DONE=== | ||
<?php exit(0); ?> | ||
--EXPECTF-- | ||
Array | ||
( | ||
[0] => -1 | ||
) | ||
===DONE=== |