From 13d9a660ca0d77fe9efcb401f53de01470033444 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 19 Jan 2007 14:44:59 +0000 Subject: [PATCH] Zeroing out memory before using it can be so important. --- src/core/resolv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/resolv.c b/src/core/resolv.c index 52ad4b63..b2fbc93d 100644 --- a/src/core/resolv.c +++ b/src/core/resolv.c @@ -56,6 +56,7 @@ int resolv ( const char *name, struct sockaddr *sa, struct async *parent ) { resolution = malloc ( sizeof ( *resolution ) ); if ( ! resolution ) return -ENOMEM; + memset ( resolution, 0, sizeof ( *resolution ) ); async_init ( &resolution->async, &resolv_async_operations, parent ); /* Check for a dotted quad IP address first */