From abda30e9e6d8fd9aa28edc4677796e61a9c88997 Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Tue, 7 Jan 2014 22:17:32 +0000 Subject: Fix bug #9618: Invalid utf8 causes JSON dissector assertion failure "g_utf8_validate" Validate JSON UTF-8 characters, replace with '?' when invalid. svn path=/trunk/; revision=54633 --- wsutil/unicode-utils.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'wsutil/unicode-utils.h') diff --git a/wsutil/unicode-utils.h b/wsutil/unicode-utils.h index a9d5318f6b..7b29d8460a 100644 --- a/wsutil/unicode-utils.h +++ b/wsutil/unicode-utils.h @@ -25,21 +25,25 @@ #ifndef __UNICODEUTIL_H__ #define __UNICODEUTIL_H__ -#include "ws_symbol_export.h" - -#ifdef _WIN32 - #include "config.h" +#include "ws_symbol_export.h" + #include -#include -#include -#include /** * @file Unicode convenience routines. */ +WS_DLL_PUBLIC +int ws_utf8_char_len(guint8 ch); + +#ifdef _WIN32 + +#include +#include +#include + /** Given a UTF-8 string, convert it to UTF-16. This is meant to be used * to convert between GTK+ 2.x (UTF-8) to Windows (UTF-16). * -- cgit v1.2.1