mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Fixed bug #50212 (crash by ldap_get_option() with LDAP_OPT_NETWORK_TIMEOUT).
This commit is contained in:
parent
bdef3ee350
commit
b7bb8aa545
2
NEWS
2
NEWS
@ -21,6 +21,8 @@ PHP NEWS
|
||||
- Fixed memory leak in extension loading when an error occurs on Windows.
|
||||
(Pierre)
|
||||
|
||||
- Fixed bug #50212 (crash by ldap_get_option() with LDAP_OPT_NETWORK_TIMEOUT).
|
||||
(Ilia, shigeru_kitazaki at cybozu dot co dot jp)
|
||||
- Fixed bug #50140 (With default compilation option, php symbols are
|
||||
unresolved for nsapi). (Uwe Schindler)
|
||||
- Fixed bug #50174 (Incorrectly matched docComment). (Felipe)
|
||||
|
@ -1583,14 +1583,17 @@ PHP_FUNCTION(ldap_get_option)
|
||||
#ifdef LDAP_OPT_NETWORK_TIMEOUT
|
||||
case LDAP_OPT_NETWORK_TIMEOUT:
|
||||
{
|
||||
struct timeval *timeout;
|
||||
struct timeval *timeout = NULL;
|
||||
|
||||
if (ldap_get_option(ld->link, LDAP_OPT_NETWORK_TIMEOUT, (void *) &timeout)) {
|
||||
if (timeout) {
|
||||
ldap_memfree(timeout);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
if (!timeout) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
zval_dtor(retval);
|
||||
ZVAL_LONG(retval, timeout->tv_sec);
|
||||
ldap_memfree(timeout);
|
||||
|
Loading…
Reference in New Issue
Block a user