diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2015-06-17 23:45:42 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-06-19 13:30:56 +0000 |
commit | e43ff89f5102702adc7d92b881733029033f6ee2 (patch) | |
tree | c9590f785f7079b23a6dfe2f7bbf9626323cba38 /ui/recent.c | |
parent | 7ec7e43f3be20d7c79b5b62252ed368aca79e54a (diff) | |
download | wireshark-e43ff89f5102702adc7d92b881733029033f6ee2.tar.gz |
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 <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/recent.c')
-rw-r--r-- | ui/recent.c | 3 |
1 files changed, 1 insertions, 2 deletions
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 <wsutil/u3.h> #include <wsutil/file_util.h> -#include <wsutil/str_util.h> #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) { |