From aa5c0ffcbfc272e5fc6cf79cba860c3bdbbc3d93 Mon Sep 17 00:00:00 2001 From: Stig Venaas Date: Tue, 13 Jun 2000 19:35:56 +0000 Subject: [PATCH] Think have to 0-terminate mod_values strings, got trailing garbage, this fixes bug #5001 I think. --- ext/ldap/ldap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 0149f1e9e7..3aa8cf5273 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -1151,6 +1151,7 @@ static void php_ldap_do_modify(INTERNAL_FUNCTION_PARAMETERS, int oper) if ((num_values == 1) && ((*value)->type != IS_ARRAY)) { convert_to_string_ex(value); ldap_mods[i]->mod_values[0] = (*value)->value.str.val; + ldap_mods[i]->mod_values[0][(*value)->value.str.len] = '\0'; } else { for(j=0; jvalue.ht,j, (void **) &ivalue); -- 2.50.1