aboutsummaryrefslogtreecommitdiffstats
path: root/capchild/capture_ifinfo.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-04-26 16:55:21 -0700
committerGerald Combs <gerald@wireshark.org>2018-04-27 01:23:01 +0000
commitf73233d261d6ded962a78376d8b9b13365e4d9d1 (patch)
treedcccbd15bba8d0ff6dc0ca9c68cda70493cb72be /capchild/capture_ifinfo.c
parent0ad423924992f8504b3e75980e1e9efb65d84214 (diff)
capture_ifinfo: Don't try to write to an invalid address.
Make sure err_str is valid before trying to assign a value. Change-Id: I4e6524b93101ef28158996797e8462168e44dc2a Reviewed-on: https://code.wireshark.org/review/27173 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'capchild/capture_ifinfo.c')
-rw-r--r--capchild/capture_ifinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/capchild/capture_ifinfo.c b/capchild/capture_ifinfo.c
index d3e893d32f..e67cf35af2 100644
--- a/capchild/capture_ifinfo.c
+++ b/capchild/capture_ifinfo.c
@@ -92,7 +92,9 @@ capture_interface_list(int *err, char **err_str, void (*update_cb)(void))
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_MESSAGE, "Capture Interface List ...");
*err = 0;
- *err_str = NULL;
+ if (err_str) {
+ *err_str = NULL;
+ }
/* Try to get our interface list */
ret = sync_interface_list_open(&data, &primary_msg, &secondary_msg, update_cb);