summaryrefslogtreecommitdiff
path: root/caputils
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2017-02-22 01:25:53 +0100
committerJörg Mayer <jmayer@loplof.de>2017-02-22 00:33:13 +0000
commit50dff6eac41bbe22e1436af1301628eb3462bf8a (patch)
tree08b2c4b5c47f1263aefc8f3578cc6626dac41fba /caputils
parentb9851c740836760ab36c4862f82f3f8cc83fde27 (diff)
downloadwireshark-50dff6eac41bbe22e1436af1301628eb3462bf8a.tar.gz
Make sure we zero out the newly allocated list, otherwise g_list append may
dereference ->next containing an arbitrary value. Bug: 13418 Change-Id: I240bc03e652ede557083379cc81b81ae83d720e5 Reviewed-on: https://code.wireshark.org/review/20235 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'caputils')
-rw-r--r--caputils/capture-pcap-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/caputils/capture-pcap-util.c b/caputils/capture-pcap-util.c
index b8b71e3bb5..3de46f3a75 100644
--- a/caputils/capture-pcap-util.c
+++ b/caputils/capture-pcap-util.c
@@ -1250,7 +1250,7 @@ get_if_capabilities(interface_options *interface_opts, char **err_str)
/*
* Allocate the interface capabilities structure.
*/
- caps = (if_capabilities_t *)g_malloc(sizeof *caps);
+ caps = (if_capabilities_t *)g_malloc0(sizeof *caps);
auth.type = interface_opts->auth_type == CAPTURE_AUTH_PWD ?
RPCAP_RMTAUTH_PWD : RPCAP_RMTAUTH_NULL;