From 79b5b1aebf9f59e4de19c9b52f473cfd06d1fd0c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 24 Sep 2001 06:24:14 +0000 Subject: fixed a silly off by 1 bug (This used to be commit e558ab6ac8930e3393291fe12289ad43175b8a1d) --- source3/lib/charcnv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index ebcceef816..0e7d5241f4 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -99,6 +99,9 @@ size_t convert_string(charset_t from, charset_t to, static int initialised; smb_iconv_t descriptor; + if (srclen == -1) srclen = strlen(src)+1; + if (destlen == -1) destlen = strlen(dest)+1; + if (!initialised) { initialised = 1; init_iconv(); -- cgit