forked from osmocom/wireshark
Don't assume we successfully read the configuration files.
read_configuration_files() can fail and return NULL, so check that commandline_info.prefs_p is non-null before dereferencing it. Fixes CID 1362778. Change-Id: I3066769c474d394fbfe548b50d6be704964e59d3 Reviewed-on: https://code.wireshark.org/review/16028 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
30919f7708
commit
fb9a7d43cd
|
@ -2497,7 +2497,9 @@ main(int argc, char *argv[])
|
|||
|
||||
#ifdef HAVE_LIBPCAP
|
||||
if ((global_capture_opts.num_selected == 0) &&
|
||||
((prefs.capture_device != NULL) && (*commandline_info.prefs_p->capture_device != '\0'))) {
|
||||
((prefs.capture_device != NULL) &&
|
||||
(commandline_info.prefs_p != NULL) &&
|
||||
(*commandline_info.prefs_p->capture_device != '\0'))) {
|
||||
guint i;
|
||||
interface_t device;
|
||||
for (i = 0; i < global_capture_opts.all_ifaces->len; i++) {
|
||||
|
|
Loading…
Reference in New Issue