From 91b154236bf0afb2d82d2e596528f6d35d14b4a4 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 28 Apr 2016 15:15:32 -0700 Subject: Win32: Pass a mutable string to CreateProcess. CreateProcess can modify its second (lpCommandLine) argument. Don't pass it the output of utf_8to16. Constify the return value of utf_8to16. Change-Id: I0d4361396e90c88a4ab2a3f2f0e058230e897fdf Reviewed-on: https://code.wireshark.org/review/15155 Petri-Dish: Gerald Combs Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs --- wsutil/unicode-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wsutil/unicode-utils.c') diff --git a/wsutil/unicode-utils.c b/wsutil/unicode-utils.c index 688de92843..8ecf85b0c2 100644 --- a/wsutil/unicode-utils.c +++ b/wsutil/unicode-utils.c @@ -59,7 +59,7 @@ ws_utf8_char_len(guint8 ch) */ /* Convert from UTF-8 to UTF-16. */ -wchar_t * +const wchar_t * utf_8to16(const char *utf8str) { static wchar_t *utf16buf[3]; -- cgit v1.2.1