From 27f71ab1cc0a5947ba108b53db1bfad5c38a0c18 Mon Sep 17 00:00:00 2001 From: John Popplewell Date: Tue, 17 Jan 2006 21:25:59 +0000 Subject: [PATCH] Fix for string length when mallocing space for copy. --- src/tuxpaint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 1791547b8..5e1f79167 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -15347,7 +15347,7 @@ static wchar_t * uppercase_w(wchar_t * str) wchar_t * ustr; unsigned int i; - ustr = (wchar_t *) malloc(sizeof(wchar_t) * wcslen(str)); + ustr = (wchar_t *) malloc(sizeof(wchar_t) * (wcslen(str)+1)); if (ustr != NULL) {