[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] dccp sizeof correction

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 <>

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
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2005-11-22 11:53    [W:0.039 / U:23.796 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site