From 50dff6eac41bbe22e1436af1301628eb3462bf8a Mon Sep 17 00:00:00 2001 From: Joerg Mayer Date: Wed, 22 Feb 2017 01:25:53 +0100 Subject: Make sure we zero out the newly allocated list, otherwise g_list append may dereference ->next containing an arbitrary value. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 13418 Change-Id: I240bc03e652ede557083379cc81b81ae83d720e5 Reviewed-on: https://code.wireshark.org/review/20235 Reviewed-by: Jörg Mayer --- caputils/capture-pcap-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'caputils') 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; -- cgit v1.2.1