File libpcap-1.0.0-fcode.patch of Package libpcap

Index: pcap-linux.c
===================================================================
--- pcap-linux.c.orig
+++ pcap-linux.c
@@ -2313,6 +2313,9 @@ pcap_setfilter_linux_common(pcap_t *hand
 	struct sock_fprog	fcode;
 	int			can_filter_in_kernel;
 	int			err = 0;
+	memset(&fcode, 0, sizeof(fcode)); 
+	fcode.len = 0; 
+	fcode.filter = NULL; 
 #endif
 
 	if (!handle)
@@ -2347,8 +2350,6 @@ pcap_setfilter_linux_common(pcap_t *hand
 		 * sake of correctness I added this check.
 		 */
 		fprintf(stderr, "Warning: Filter too complex for kernel\n");
-		fcode.len = 0;
-		fcode.filter = NULL;
 		can_filter_in_kernel = 0;
 	} else
 #endif /* USHRT_MAX */
openSUSE Build Service is sponsored by