Zero the tdb key, there might be padding
authorVolker Lendecke <vl@sernet.de>
Wed, 19 Dec 2007 15:48:04 +0000 (16:48 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 19 Dec 2007 15:57:40 +0000 (16:57 +0100)
This leads to uninitialized variable warnings if nmbd is run under valgrind.
(This used to be commit 9ec4f91f35696e5a00e24fe9ae2dd06119482c80)

source3/libsmb/unexpected.c

index 92a609c42b5b7008d01e73a2dc5fb33fc05ed466..195668c44a8bfcd16cb3661329d0c988611eb400 100644 (file)
@@ -63,6 +63,8 @@ void unexpected_packet(struct packet_struct *p)
 
        len = build_packet(&buf[6], sizeof(buf)-6, p) + 6;
 
+       ZERO_STRUCT(key);       /* needed for potential alignment */
+
        key.packet_type = p->packet_type;
        key.timestamp = p->timestamp;
        key.count = count++;