aboutsummaryrefslogtreecommitdiffstats
path: root/extcap.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-11-17 11:32:01 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-11-17 10:37:36 +0000
commit9ba4c95b5590c5fa3d22f6089e216b79a5c00079 (patch)
tree9d90637e167f0eacf3083b2426c84321d70cae2a /extcap.c
parent7518a74dbb32f941509a5dcabb5f74a3af14985d (diff)
extcap: fix a crash introduced in g622603b
When using GTK UI, cfilter is initialized to NULL, not to an empty string. Change-Id: Ic9f3957d4de551a929578e76d5b9c63936517299 Reviewed-on: https://code.wireshark.org/review/11910 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'extcap.c')
-rw-r--r--extcap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/extcap.c b/extcap.c
index c161e48c39..22fdb7553d 100644
--- a/extcap.c
+++ b/extcap.c
@@ -583,7 +583,7 @@ extcaps_init_initerfaces(capture_options *capture_opts)
add_arg(EXTCAP_ARGUMENT_RUN_CAPTURE);
add_arg(EXTCAP_ARGUMENT_INTERFACE);
add_arg(interface_opts.name);
- if (strlen(interface_opts.cfilter) > 0) {
+ if (interface_opts.cfilter && strlen(interface_opts.cfilter) > 0) {
add_arg(EXTCAP_ARGUMENT_CAPTURE_FILTER);
add_arg(interface_opts.cfilter);
}