cpu/cpu-1.4.3-empty-attr.patch

16 lines
545 B
Diff
Raw Normal View History

diff -up cpu-1.4.3/src/plugins/ldap/ld.c.empty-attr cpu-1.4.3/src/plugins/ldap/ld.c
--- cpu-1.4.3/src/plugins/ldap/ld.c.empty-attr 2010-11-05 21:18:12.000000000 -0600
+++ cpu-1.4.3/src/plugins/ldap/ld.c 2010-11-05 21:19:48.000000000 -0600
@@ -282,7 +282,10 @@ ldapBuildListStr (int mod_op, char *mod_
{
char **temp;
- if (value == NULL)
+ if (mod_type == NULL || strlen(mod_type) == strspn(mod_type, " "))
+ return mods;
+
+ if (value == NULL || strlen(value) == strspn(value, " "))
return mods;
mods = ldapAddList (mods);