diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2016-02-22 17:53:13 +0200 |
---|---|---|
committer | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2016-02-22 19:48:56 +0000 |
commit | 13332353607ac00158bc36ab08e7442c9722ef24 (patch) | |
tree | 2f55c2e4c6b90a43aaf8ec9e5b0835f7da9fa6d9 /caputils | |
parent | 97de3b3cd75da5fb27dc0314165861c5ee0c227e (diff) |
caputils: fix crash when calling 'dumpcap -i' without having WinPcap installed
Add a test on err_str buffer presence before trying to use it,
like what is done in other code paths.
Bug: 12143
Change-Id: I30ae49a33224dc190c202637767df9d7de2c0f2b
Reviewed-on: https://code.wireshark.org/review/14074
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'caputils')
-rw-r--r-- | caputils/capture-wpcap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/caputils/capture-wpcap.c b/caputils/capture-wpcap.c index 50e8a06fa1..5094375e75 100644 --- a/caputils/capture-wpcap.c +++ b/caputils/capture-wpcap.c @@ -813,7 +813,8 @@ get_interface_list(int *err, char **err_str) * interfaces. */ *err = DONT_HAVE_PCAP; - *err_str = cant_load_winpcap_err("you"); + if (err_str != NULL) + *err_str = cant_load_winpcap_err("you"); return NULL; } |