]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Zeroing out memory before using it can be so important.
authorMichael Brown <mcb30@etherboot.org>
Fri, 19 Jan 2007 14:44:59 +0000 (14:44 +0000)
committerMichael Brown <mcb30@etherboot.org>
Fri, 19 Jan 2007 14:44:59 +0000 (14:44 +0000)
src/core/resolv.c

index 52ad4b630198684a2c38772f4810032e50e18698..b2fbc93d0fba407e4f0414be59a72cb98f0b65be 100644 (file)
@@ -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 */