Fix convert_string() to take a *converted_size arg. and return a bool.
[nivanova/samba-autobuild/.git] / source3 / lib / smbldap.c
index c094fbe255f5c2ec9f9554f10d01c031f1128956..207f435d284e60f51e53a9c940dc7ec1db769644 100644 (file)
@@ -264,6 +264,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
                                    int max_len)
 {
        char **values;
+       size_t size = 0;
 
        if ( !attribute )
                return False;
@@ -276,7 +277,7 @@ ATTRIB_MAP_ENTRY sidmap_attr_list[] = {
                return False;
        }
 
-       if (convert_string(CH_UTF8, CH_UNIX,values[0], -1, value, max_len) == (size_t)-1) {
+       if (!convert_string(CH_UTF8, CH_UNIX,values[0], -1, value, max_len, &size)) {
                DEBUG(1, ("smbldap_get_single_attribute: string conversion of [%s] = [%s] failed!\n", 
                          attribute, values[0]));
                ldap_value_free(values);