-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #76449: SIGSEGV in firebird_handle_doer
We need to verify that the `result_size` is not larger than our buffer, and also should make sure that the `len` which is passed to `isc_vax_integer()` has a permissible value; otherwise we bail out.
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 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
Binary file not shown.
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,23 @@ | ||
--TEST-- | ||
Bug #76449 (SIGSEGV in firebird_handle_doer) | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('pdo_firebird')) die("skip pdo_firebird extension not available"); | ||
if (!extension_loaded('sockets')) die("skip sockets extension not available"); | ||
?> | ||
--FILE-- | ||
<?php | ||
require_once "payload_server.inc"; | ||
|
||
$address = run_server(__DIR__ . "/bug_76449.data"); | ||
|
||
// no need to change the credentials; we're running against a fake server | ||
$dsn = "firebird:dbname=inet://$address/test"; | ||
$username = 'SYSDBA'; | ||
$password = 'masterkey'; | ||
|
||
$dbh = new PDO($dsn, $username, $password, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]); | ||
var_dump($dbh->exec("INSERT INTO test VALUES ('hihi2', 'xxxxx')")); | ||
?> | ||
--EXPECT-- | ||
bool(false) |