From d0de93ca762e8b59f09c2179448188c9952f68fc Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 13 Sep 2007 17:25:57 +0000 Subject: r25136: When tallocing a string to uppercase remember the terminating '\0' in size calculations. Jeremy. (This used to be commit 54c658867db3b6c602080d60936abab3af26e112) --- source3/lib/charcnv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/charcnv.c') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 4a2e768d05..c481c9a7e2 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -841,7 +841,7 @@ char *talloc_strdup_upper(TALLOC_CTX *ctx, const char *s) TALLOC_FREE(out_buffer); size = convert_string_talloc(ctx, CH_UNIX, CH_UTF16LE, - s, strlen(s), + s, strlen(s)+1, (void *)&ubuf, True); if (size == (size_t)-1) { -- cgit