mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dccp sizeof correction
@ 2005-11-22 10:51 Hagen Paul Pfeifer
  2005-11-22 10:09 ` YOSHIFUJI Hideaki / 吉藤英明
  0 siblings, 1 reply; 2+ messages in thread
From: Hagen Paul Pfeifer @ 2005-11-22 10:51 UTC (permalink / raw)
  To: linux-kernel; +Cc: acme, dccp


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-22 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-22 10:51 [PATCH] dccp sizeof correction Hagen Paul Pfeifer
2005-11-22 10:09 ` YOSHIFUJI Hideaki / 吉藤英明

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®