summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2015-06-03 16:58:22 +0200
committerJeremy Allison <jra@samba.org>2015-06-09 18:11:13 +0200
commit1c60dc5c3252685d51324481063461f60cf968fe (patch)
tree6d5b4036dc921550330dc90a3805e1f5a0090a05 /lib
parentb26a1449a0e6d01d5ddca89547df739732c8a230 (diff)
downloadsamba-1c60dc5c3252685d51324481063461f60cf968fe.tar.gz
lib/util/charset: fix conversion failure logging
Move catch-all debug statement with loglevel 0 from behind the switch clause into the switch clause as default case. Fixes an issue that resulted in the log being flooded with level 0 messages in case someone put a file with an illegal UTF8 encoding (eg '\xA0test') on the server. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/util/charset/convert_string.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/util/charset/convert_string.c b/lib/util/charset/convert_string.c
index 2e666802c9e..50065f8e076 100644
--- a/lib/util/charset/convert_string.c
+++ b/lib/util/charset/convert_string.c
@@ -434,8 +434,10 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct smb_iconv_handle *ic,
reason="Illegal multibyte sequence";
DEBUG(3,("convert_string_talloc: Conversion error: %s(%s)\n",reason,inbuf));
break;
+ default:
+ DEBUG(0,("Conversion error: %s(%s)\n",reason,inbuf));
+ break;
}
- DEBUG(0,("Conversion error: %s(%s)\n",reason,inbuf));
/* smb_panic(reason); */
TALLOC_FREE(ob);
return false;