From: Frank Lahm Date: Tue, 6 Mar 2012 15:58:06 +0000 (+0100) Subject: LDAP config string values must be strdup'ed X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcbdb8f648b0ec46a6213967a0f3c7cf488a925d;hp=5fe2b6b2d03bd988c4e70f931bba23fa21c32a5f;p=netatalk.git LDAP config string values must be strdup'ed --- diff --git a/libatalk/acl/ldap_config.c b/libatalk/acl/ldap_config.c index 6cf554a8..bd9d414b 100644 --- a/libatalk/acl/ldap_config.c +++ b/libatalk/acl/ldap_config.c @@ -48,7 +48,7 @@ int acl_ldap_readconfig(dictionary *iniconfig) *((int *)(ldap_prefs[i].pref)) = atoi(val); else /* store string as string */ - *((const char **)(ldap_prefs[i].pref)) = val; + *((const char **)(ldap_prefs[i].pref)) = strdup(val); } else { /* ok, we have string to int mapping for this pref eg. "none", "simple", "sasl" map to 0, 128, 129 */