Wireshark mailing list archives
wsutil/unicode-utils.c
From: Gisle Vanem <gvanem () broadpark no>
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 ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- wsutil/unicode-utils.c Gisle Vanem (Oct 02)
- Re: wsutil/unicode-utils.c Jakub Zawadzki (Oct 02)
- Re: wsutil/unicode-utils.c Gisle Vanem (Oct 02)
- Re: wsutil/unicode-utils.c Jakub Zawadzki (Oct 02)