1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00
Files
nmap/libpcap/NMAP_MODIFICATIONS/0003-Add-a-memset-call-that-removes-a-Valgrind-error.patch
david 1eba012356 Rearrange libpcap patch files for AIX compatibility.
The patch that moves "config.h" to the top of scanner.l (and hence
scanner.c) has to happen before the files are pregenerated, otherwise
there is an error on AIX:

In file included from scanner.c:2792:
/usr/include/unistd.h:171: error: conflicting types for 'lseek64'
/usr/include/unistd.h:169: error: previous declaration of 'lseek64' was here
2012-04-13 15:50:15 +00:00

26 lines
679 B
Diff

From 6a31f45eb5ae5c7319263806c2962c844efb0e99 Mon Sep 17 00:00:00 2001
From: David Fifield <david@bamsoftware.com>
Date: Mon, 9 Apr 2012 17:10:19 -0700
Subject: [PATCH 3/4] Add a memset call that removes a Valgrind error.
http://seclists.org/nmap-dev/2010/q3/796
---
pcap-linux.c | 1 +
1 file changed, 1 insertion(+)
diff --git pcap-linux.c pcap-linux.c
index 213558b..97092ac 100644
--- pcap-linux.c
+++ pcap-linux.c
@@ -2315,6 +2315,7 @@ pcap_setfilter_linux_common(pcap_t *handle, struct bpf_program *filter,
struct sock_fprog fcode;
int can_filter_in_kernel;
int err = 0;
+ memset(&fcode, 0, sizeof(struct sock_fprog));
#endif
if (!handle)
--
1.7.9.5