mirror of
https://github.com/samba-team/samba.git
synced 2025-08-29 13:49:30 +03:00
lib/util/charset Always set *converted_size even on failure
The caller may wish to inspect the partially converted string. Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Wed Apr 20 05:17:48 CEST 2011 on sn-devel-104
This commit is contained in:
@ -85,11 +85,9 @@ static bool convert_string_internal(struct smb_iconv_handle *ic,
|
||||
o_len=destlen;
|
||||
|
||||
retval = smb_iconv(descriptor, &inbuf, &i_len, &outbuf, &o_len);
|
||||
if (retval == (size_t)-1) {
|
||||
return false;
|
||||
}
|
||||
*converted_size = destlen-o_len;
|
||||
return true;
|
||||
|
||||
return (retval != (size_t)-1);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user