PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB » Bug #631

Segfault when connecting to the database without password

Details

Submitted2004-01-27 12:02 UTC
Fromphp at dima dot spb dot ru
Assigneddanielc
StatusClosed
PackageDB
PHP Version4.3.4
OSRedHat 9
Roadmaps(Not assigned)

Comments

[2004-01-27 12:02 UTC] php at dima dot spb dot ru

Description:
------------
// $Id: sybase.php,v 1.32 2004/01/22 15:13:01 danielc Exp $

if ($interface && $user && $pw) {
$conn = @$connect_function($interface, $user, $pw);
} elseif ($interface && $user) {
$conn = @$connect_function($interface, $user);
} else {
$conn = FALSE;
}

The second branch is executed when no password is given. Unfortunately, it causes segfault on my system. I have no idea why but I think it is because there is no sybase_connect function with two arguments.

If I change

$conn = @$connect_function($interface, $user);

to

$conn = @$connect_function($interface, $user, false);

everything works fine.

I'm using FreeTDS 0.62.1