lib:charset: Fix error messages from charset conversion
authorChristof Schmitt via samba-technical <samba-technical@lists.samba.org>
Thu, 28 Jun 2018 18:50:13 +0000 (11:50 -0700)
committerRalph Boehme <slow@samba.org>
Sat, 7 Jul 2018 11:41:09 +0000 (13:41 +0200)
commit3430c9c3c27b4c5fe5d38797acc7aa6aeb03c2b4
tree689b800499dac8b3d614b921999a19c046b15b12
parent4ad2a716fb0733e44f5bc000fb85e31aff83e682
lib:charset: Fix error messages from charset conversion

When e.g. trying to access a filename through Samba that does not adhere
to the encoding configured in 'unix charset', the log will show the
encoding problem, followed by "strstr_m: src malloc fail". The problem
is that strstr_m assumes that any failure from push/pull_ucs2_talloc is
a memory allocation problem, which is not correct.

Address this by removing the misleading messages and add a missing
message in convert_string_talloc_handle.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/charset/convert_string.c
lib/util/charset/util_str.c