lkml.org 
[lkml]   [2005]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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

HGN


Signed-off-by: Hagen Paul Pfeifer <hpplinuxml@0xdef.net>

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  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