From: Tom Yu Date: Thu, 26 Oct 2006 19:39:13 +0000 (+0000) Subject: pull up r18669 from trunk X-Git-Tag: krb5-1.5.2-final~11 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25922d0f56bb6c541d63f2ba058dc1f43d4128e2;p=krb5.git pull up r18669 from trunk r18669@cathode-dark-space: rra | 2006-10-07 23:22:48 -0400 Ticket: new Subject: Initialize buffer before calling res_ninit Component: krb5-libs Version_Reported: 1.5.1 Target_Version: 1.5.2 Tags: pullup Per Paul Vixie: It is necessary to zero out the statbuf before calling res_ninit(), or else res_vinit() will call res_nclose() and res_ndestroy() with stack trash as a statbuf, and they will call free() with stack trash, and programs will dump core. ticket: 4500 version_fixed: 1.5.2 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-5@18742 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c index ef8b08783..7a6583ca0 100644 --- a/src/lib/krb5/os/dnsglue.c +++ b/src/lib/krb5/os/dnsglue.c @@ -100,6 +100,7 @@ krb5int_dns_init(struct krb5int_dns_state **dsp, #endif #if USE_RES_NINIT + memset(&statbuf, 0, sizeof(statbuf)); ret = res_ninit(&statbuf); #else ret = res_init();