Wireshark-dev: [Wireshark-dev] wsutil/unicode-utils.c
From: Gisle Vanem <gvanem@xxxxxxxxxxxx>
Date: Tue, 02 Oct 2012 15:02:11 +0200
utf_8to16() and utf_16to8() uses indices from 0 to 3. So there should be 4 buffers
for length and data. No?

--- SVN-Latest\wsutil\unicode-utils.c   2012-07-05 19:01:54.078125000 +0200
+++ wsutil\unicode-utils.c      2012-10-02 15:00:36.656250000 +0200
@@ -52,8 +52,8 @@
wchar_t *
utf_8to16(const char *utf8str)
{
-  static wchar_t *utf16buf[3];
-  static int utf16buf_len[3];
+  static wchar_t *utf16buf[4];
+  static int utf16buf_len[4];
  static int idx;

  if (utf8str == NULL)
@@ -107,8 +107,8 @@
gchar *
utf_16to8(const wchar_t *utf16str)
{
-  static gchar *utf8buf[3];
-  static int utf8buf_len[3];
+  static gchar *utf8buf[4];
+  static int utf8buf_len[4];
  static int idx;

  if (utf16str == NULL)


--gv