com php-src: Fixed an error in ldap_exop introduced by last commit: ext/ldap/ldap.c
| From: | Côme Bernigaud | Date: | Wed, 06 Sep 2017 13:05:27 +0000 |
| Subject: | com php-src: Fixed an error in ldap_exop introduced by last commit: ext/ldap/ldap.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99287@lists.php.net to get a copy of this message | ||
Commit: 28630f792047db99f0f7cf48ab270d5912979360
Author: Côme Chilliet <mcmic@php.net> Wed, 6 Sep 2017 15:04:37 +0200
Parents: 8e6619445f0029ade97581839f99645215a416c4
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=28630f792047db99f0f7cf48ab270d5912979360
Log:
Fixed an error in ldap_exop introduced by last commit
Changed paths:
M ext/ldap/ldap.c
Diff:
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index a43d054..fb289c3 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -3350,12 +3350,14 @@ PHP_FUNCTION(ldap_exop)
if (reqdata) {
lreqdata.bv_val = ZSTR_VAL(reqdata);
lreqdata.bv_len = ZSTR_LEN(reqdata);
+ } else {
+ lreqdata.bv_len = 0;
}
if (retdata) {
/* synchronous call */
rc = ldap_extended_operation_s(ld->link, ZSTR_VAL(reqoid),
- reqdata ? &lreqdata: NULL,
+ lreqdata.bv_len > 0 ? &lreqdata: NULL,
NULL,
NULL,
retoid ? &lretoid : NULL,