diff options
author | Jeremy Allison <jra@samba.org> | 2011-03-30 13:08:31 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-03-30 23:59:37 +0200 |
commit | c109a70531de72eef30a695248b91704bd0c7c24 (patch) | |
tree | 29182afa1ae334e8aee0e71e59aa1a0e5de65f6a /source3/lib/smbldap.c | |
parent | 9ede19fdccaf09303012208129a093197403ef2c (diff) | |
download | samba-c109a70531de72eef30a695248b91704bd0c7c24.tar.gz samba-c109a70531de72eef30a695248b91704bd0c7c24.tar.xz samba-c109a70531de72eef30a695248b91704bd0c7c24.zip |
Fix convert_string() to take a *converted_size arg. and return a bool.
Makes these interfaces much harder to misuse and easier to ensure error
checking.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/lib/smbldap.c')
-rw-r--r-- | source3/lib/smbldap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/smbldap.c b/source3/lib/smbldap.c index c094fbe255f..207f435d284 100644 --- a/source3/lib/smbldap.c +++ b/source3/lib/smbldap.c @@ -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); |