[PATCH] dccp sizeof correction

From: Hagen Paul Pfeifer
Date: Tue Nov 22 2005 - 05:51:07 EST

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

best regards


Signed-off-by: Hagen Paul Pfeifer <hpplinuxml@xxxxxxxxx>

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

applies-to: 69ebfee77c8a174c87ea8ed31e023c94b09a9d6e
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))
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/