com php-src: Correctly add to the length of the final string: ext/ldap/ldap.c

From: Date: Sun, 26 Jun 2016 22:10:51 +0000
Subject: com php-src: Correctly add to the length of the final string: ext/ldap/ldap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92863@lists.php.net to get a copy of this message
Commit: e85a2e360c0e0efc1130c27b8f3c2cb7dc6b6726 Author: Chad Sikorra <Chad.Sikorra@gmail.com> Sun, 26 Jun 2016 17:10:51 -0500 Parents: 737ee1f2c9277a61ba784df06926cbb3739599b4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=e85a2e360c0e0efc1130c27b8f3c2cb7dc6b6726 Log: Correctly add to the length of the final string Changed paths: M ext/ldap/ldap.c Diff: diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 915ac3f..bdb90f8 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2837,7 +2837,7 @@ static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value, if (flags & PHP_LDAP_ESCAPE_DN && value[0] == ' ') { len += 2; } - if (flags & PHP_LDAP_ESCAPE_DN && valuelen && value[valuelen] == ' ') { + if (flags & PHP_LDAP_ESCAPE_DN && valuelen && value[valuelen - 1] == ' ') { len += 2; }

« previous php.cvs (#92863) next »