aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-08-24 23:43:46 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-08-26 14:58:04 +0000
commit88a3b3027dc20b94579bcc9b1a9fd87d96b4c6ec (patch)
treef8f25a7813a349f6728fc113b0334a947be47d5d /capture_opts.c
parente28f490426cd547fef74dc2bc37d426310d5b1ea (diff)
Extcap: prevent a GLib assert when interface_opts.extcap_args is NULL
I was able to trigger it when trying to change the options of extcap_example.py interface Change-Id: I9ecff51d47b3ef6e178637b31d49af46a1928acd Reviewed-on: https://code.wireshark.org/review/3822 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/capture_opts.c b/capture_opts.c
index f783d9f811..4feccd79b0 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -1095,7 +1095,8 @@ collect_ifaces(capture_options *capture_opts)
interface_opts.extcap_fifo = NULL;
interface_opts.extcap_args = device.external_cap_args_settings;
interface_opts.extcap_pid = (GPid)-1;
- g_hash_table_ref(interface_opts.extcap_args);
+ if (interface_opts.extcap_args)
+ g_hash_table_ref(interface_opts.extcap_args);
#endif
#if defined(_WIN32) || defined(HAVE_PCAP_CREATE)
interface_opts.buffer_size = device.buffer;