From e43ff89f5102702adc7d92b881733029033f6ee2 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Wed, 17 Jun 2015 23:45:42 +0200 Subject: recent.c: accept an UTF-8 string in read_set_recent_pair_dynamic() function Previous code was checking that the string was ASCII, which does not work when the recent capture files list contains non ASCII characters Change-Id: I1ea96035cca4b2aa2ea5061e7a4f98e78ac88f20 Reviewed-on: https://code.wireshark.org/review/8965 Petri-Dish: Pascal Quantin Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin Reviewed-by: Anders Broman --- ui/recent.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui') diff --git a/ui/recent.c b/ui/recent.c index d0c99ce074..ca4fb7d51f 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -40,7 +40,6 @@ #include #include -#include #define RECENT_KEY_MAIN_TOOLBAR_SHOW "gui.toolbar_main_show" #define RECENT_KEY_FILTER_TOOLBAR_SHOW "gui.filter_toolbar_show" @@ -1128,7 +1127,7 @@ read_set_recent_pair_dynamic(gchar *key, const gchar *value, void *private_data _U_, gboolean return_range_errors _U_) { - if (!isprint_string(value)) { + if (!g_utf8_validate(value, -1, NULL)) { return PREFS_SET_SYNTAX_ERR; } if (strcmp(key, RECENT_KEY_CAPTURE_FILE) == 0) { -- cgit v1.2.1