From 1463c220c507eb8b76ef6527c772b0deda754217 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 May 2003 20:19:21 +0000 Subject: fixed bug #75; add check for non-zero destlen (This used to be commit bfcec106d00355d32eb40dde99ddd5d5bed4cedb) --- source3/lib/charcnv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 7acb7147fd..c3360bbb65 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -252,7 +252,7 @@ convert: destlen = destlen - o_len; *dest = (char *)Realloc(ob,destlen); - if (!*dest) { + if (destlen && !*dest) { DEBUG(0, ("convert_string_allocate: out of memory!\n")); SAFE_FREE(ob); return (size_t)-1; -- cgit