diff options
author | Stig Venaas <venaas@php.net> | 2000-06-13 19:35:56 +0000 |
---|---|---|
committer | Stig Venaas <venaas@php.net> | 2000-06-13 19:35:56 +0000 |
commit | aa5c0ffcbfc272e5fc6cf79cba860c3bdbbc3d93 (patch) | |
tree | 0ed82d0757f660fe952ff250a25371e0b187ef3b | |
parent | 727398b2d4cf7892e78a286ca99a228eb0e32bbb (diff) | |
download | php-git-aa5c0ffcbfc272e5fc6cf79cba860c3bdbbc3d93.tar.gz |
Think have to 0-terminate mod_values strings, got trailing garbage,
this fixes bug #5001 I think.
-rw-r--r-- | ext/ldap/ldap.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; j<num_values; j++) { zend_hash_index_find((*value)->value.ht,j, (void **) &ivalue); |