mirror of
https://github.com/php/php-src.git
synced 2026-04-01 05:02:27 +02:00
Correctly add to the length of the final string
This commit is contained in:
@@ -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 - 1] == ' ') {
|
||||
if (flags & PHP_LDAP_ESCAPE_DN && valuelen > 1 && value[valuelen - 1] == ' ') {
|
||||
len += 2;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user