From dc1647fdc32919ebaf47819d7aaa88d81b71736c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 1 Oct 2025 14:16:49 -0500 Subject: Clear binary attribute data on modify if replacement binary data length is 0 --- src/libtdeldap.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/libtdeldap.cpp') diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp index ef620c7..b9b8498 100644 --- a/src/libtdeldap.cpp +++ b/src/libtdeldap.cpp @@ -984,6 +984,14 @@ void add_single_binary_attribute_operation(LDAPMod **mods, int *i, TQString attr mods[*i]->mod_bvalues = values; (*i)++; } + else { + char **values = (char**)malloc(sizeof(char*)); + values[0] = NULL; + mods[*i]->mod_op = LDAP_MOD_REPLACE; + mods[*i]->mod_type = strdup(attr.ascii()); + mods[*i]->mod_values = values; + (*i)++; + } } void add_multiple_attributes_operation(LDAPMod **mods, int *i, TQString attr, TQStringList strings) { -- cgit v1.2.3