extcap: check that argument parameter is not null before adding it to command line
authorPascal Quantin <pascal.quantin@gmail.com>
Mon, 28 Aug 2017 19:36:37 +0000 (21:36 +0200)
committerDario Lombardo <lomato@gmail.com>
Tue, 29 Aug 2017 07:44:28 +0000 (07:44 +0000)
Without this test, we add an argument with an empty parameter

Bug: 14006
Change-Id: I7e5313f652691808735f54b533cf5a7f7adeeae1
Reviewed-on: https://code.wireshark.org/review/23271
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
extcap.c

index 3dc2d622abe8052dc1bc3bd33843662f0eee79b2..53bead8dd50f80adfde80731ed0be1548684b601 100644 (file)
--- a/extcap.c
+++ b/extcap.c
@@ -1316,7 +1316,7 @@ GPtrArray *extcap_prepare_arguments(interface_options *interface_opts)
                     }
                     else
                     {
-                        if (stored) {
+                        if (stored && strlen(stored) > 0) {
                             add_arg(arg_iter->call);
                             add_arg(stored);
                         }