lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20070604.231754.74747974.davem@davemloft.net>
Date:	Mon, 04 Jun 2007 23:17:54 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	herbert@...dor.apana.org.au
Cc:	netdev@...r.kernel.org
Subject: Re: [2/4] [IPV4]: Convert IPv4 devconf to an array

From: Herbert Xu <herbert@...dor.apana.org.au>
Date: Sat, 2 Jun 2007 20:02:52 +1000

> @@ -64,20 +64,26 @@
>  #include <net/rtnetlink.h>
>  
>  struct ipv4_devconf ipv4_devconf = {
> -	.accept_redirects = 1,
> -	.send_redirects =  1,
> -	.secure_redirects = 1,
> -	.shared_media =	  1,
> +	.data = {
> +		[NET_IPV4_CONF_ACCEPT_REDIRECTS] = 1,
> +		[NET_IPV4_CONF_SEND_REDIRECTS] = 1,
> +		[NET_IPV4_CONF_SECURE_REDIRECTS] = 1,
> +		[NET_IPV4_CONF_SHARED_MEDIA] = 1,
> +	},
>  };

These array indexes are off by one.

This is the danger in using this "x-1" indexing style.
Such a mistake is way too easy to make.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ