From: Michael Brown Date: Fri, 19 Jan 2007 14:44:59 +0000 (+0000) Subject: Zeroing out memory before using it can be so important. X-Git-Tag: v0.9.3~524 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d9a660ca0d77fe9efcb401f53de01470033444;p=thirdparty%2Fipxe.git Zeroing out memory before using it can be so important. --- diff --git a/src/core/resolv.c b/src/core/resolv.c index 52ad4b630..b2fbc93d0 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 */