[PATCH] dccp sizeof correction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Setsockopt in DCCP make the assumption that sizeof(int) is the same as
sizeof(u32), that isn't correct at all. ;)

best regards

HGN


Signed-off-by: Hagen Paul Pfeifer <[email protected]>

 net/dccp/proto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

applies-to: 69ebfee77c8a174c87ea8ed31e023c94b09a9d6e
d24574ecf034d259882a6de16d27aff60c009c8d
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index a021c34..a1be808 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -256,7 +256,7 @@ int dccp_setsockopt(struct sock *sk, int
 	if (level != SOL_DCCP)
 		return ip_setsockopt(sk, level, optname, optval, optlen);
 
-	if (optlen < sizeof(int))
+	if (optlen < sizeof(u32))
 		return -EINVAL;
 
 	if (get_user(val, (int __user *)optval))
---
0.99.9g
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux