From: jpbarrette at savoirfairelinux dot net Operating system: linux PHP version: 4.3.2 PHP Bug Type: Reproducible crash Bug description: php segfault when calling ldap_get_option on an unbinded ldap session
Description: ------------ when I'm trying to get the LDAP_OPT_ERROR_STRING option, by the ldap_get_option function, after the ldap_bind function faillure, php is segfaulting. Reproduce code: --------------- <?php $host = "localhost"; $user = ""; $passwd = ""; $connection = @ldap_connect($this->host, $this->port); if(!$connection){ die("unable to connect"); } if([EMAIL PROTECTED]($connection, $user, $passwd)){ echo ldap_error($connection); $error = ""; echo ldap_get_option($connection, LDAP_OPT_ERROR_STRING, $error); } ?> Expected result: ---------------- I'm expecting to get the LDAP_OPT_ERROR_STRING value -- Edit bug report at http://bugs.php.net/?id=25764&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25764&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25764&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=25764&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=25764&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=25764&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=25764&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=25764&r=support Expected behavior: http://bugs.php.net/fix.php?id=25764&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=25764&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=25764&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=25764&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25764&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=25764&r=dst IIS Stability: http://bugs.php.net/fix.php?id=25764&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=25764&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=25764&r=float