diff options
| author | Russ Allbery <rra@stanford.edu> | 2006-10-08 03:22:48 +0000 |
|---|---|---|
| committer | Russ Allbery <rra@stanford.edu> | 2006-10-08 03:22:48 +0000 |
| commit | ad8951bc9b574ea81f25eb595cd51251140f8fc9 (patch) | |
| tree | 9506170f97fd04d3e89606abcd748120371aff22 /src/lib | |
| parent | 80044f8fd17b505c13f2502ef92f4f2e88cfdde4 (diff) | |
| download | krb5-ad8951bc9b574ea81f25eb595cd51251140f8fc9.tar.gz krb5-ad8951bc9b574ea81f25eb595cd51251140f8fc9.tar.xz krb5-ad8951bc9b574ea81f25eb595cd51251140f8fc9.zip | |
Initialize buffer before calling res_ninit
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: new
Component: krb5-libs
Version_Reported: 1.5.1
Target_Version: 1.5.2
Tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18669 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/os/dnsglue.c | 1 |
1 files changed, 1 insertions, 0 deletions
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(); |
