From: Oliver Kurth Date: Fri, 2 Aug 2019 18:07:21 +0000 (-0700) Subject: Fix crash in nicinfo/nicInfoPosix.c:PrintResolverNSInfo X-Git-Tag: stable-11.1.0~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49dc92d4f417c07ab370b390fe3459bce8282bf0;p=thirdparty%2Fopen-vm-tools.git Fix crash in nicinfo/nicInfoPosix.c:PrintResolverNSInfo SIGSEGV trying to access resp->_u._ext.nsaddrs[i]->sin6_family in PrintResolverNSInfo. Fix: zero out the struct __res_state memory before calling res_ninit(). --- diff --git a/open-vm-tools/lib/nicInfo/nicInfoPosix.c b/open-vm-tools/lib/nicInfo/nicInfoPosix.c index 3fa91053f..e661993b3 100644 --- a/open-vm-tools/lib/nicInfo/nicInfoPosix.c +++ b/open-vm-tools/lib/nicInfo/nicInfoPosix.c @@ -838,6 +838,7 @@ RecordResolverInfo(NicInfoV3 *nicInfo) // OUT char **s; struct __res_state res; + memset(&res, 0, sizeof res); if (res_ninit(&res) == -1) { g_warning("%s: Resolver res_init failed.\n", __FUNCTION__); return FALSE;