From 73e401afd22f5d6c25da6addd6ea4b47a781eba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Mo=C5=84?= Date: Thu, 25 Apr 2019 16:44:56 +0200 Subject: extcap: Do not crash on invalid values The easiest way to trigger the crash was to forget the {display=...} in the extcap config value sentence. This change fixes the crash by simply ignoring invalid value sentences. Bug: 15668 Bug: 15728 Change-Id: I2f41682460c3e08fa766046949f013247bc0a846 Reviewed-on: https://code.wireshark.org/review/32984 Petri-Dish: Anders Broman Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- extcap_parser.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'extcap_parser.c') diff --git a/extcap_parser.c b/extcap_parser.c index 62a5fc5aec..44ca9bfd56 100644 --- a/extcap_parser.c +++ b/extcap_parser.c @@ -578,6 +578,8 @@ static extcap_arg *extcap_parse_arg_sentence(GList *args, extcap_token_sentence } else if (sent == EXTCAP_SENTENCE_VALUE) { value = extcap_parse_value_sentence(s); + if (value == NULL) + return NULL; if ((entry = g_list_find_custom(args, &value->arg_num, glist_find_numbered_arg)) == NULL) { -- cgit v1.2.3