[ 24/89] ipv4: avoid undefined behavior in do_ip_setsockopt()

2012-12-03 Thread Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know. -- From: Xi Wang [ Upstream commit 0c9f79be295c99ac7e4b569ca493d75fdcc19e4e ] (1< Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- net/ipv4/ip_sockglue.c | 33

[ 24/89] ipv4: avoid undefined behavior in do_ip_setsockopt()

2012-12-03 Thread Ben Hutchings
3.2-stable review patch. If anyone has any objections, please let me know. -- From: Xi Wang xi.w...@gmail.com [ Upstream commit 0c9f79be295c99ac7e4b569ca493d75fdcc19e4e ] (1optname) is undefined behavior in C with a negative optname or optname larger than 31. In those cases