diff options
author | Olaf Kirch <okir@suse.de> | 2005-01-09 20:27:49 -0800 |
---|---|---|
committer | David S. Miller <davem@nuts.davemloft.net> | 2005-01-09 20:27:49 -0800 |
commit | b85170174e8e48a1c858cea36da719ade18fc859 (patch) | |
tree | 0572ec5642a5fcd3873c73f6541824176bbfd014 /net | |
parent | 8bcfd3cc761d2e98e3ab0cdf2228b581b98fc676 (diff) | |
download | history-b85170174e8e48a1c858cea36da719ade18fc859.tar.gz |
[NET]: Fix CMSG_COMPAT_OK length check.
Need to check against struct compat_cmsghdr
not struct cmsghdr.
Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/compat.c b/net/compat.c index e80e0cebf4640e..8d2a8d0131891f 100644 --- a/net/compat.c +++ b/net/compat.c @@ -125,7 +125,7 @@ int verify_compat_iovec(struct msghdr *kern_msg, struct iovec *kern_iov, (struct compat_cmsghdr __user *)NULL) #define CMSG_COMPAT_OK(ucmlen, ucmsg, mhdr) \ - ((ucmlen) >= sizeof(struct cmsghdr) && \ + ((ucmlen) >= sizeof(struct compat_cmsghdr) && \ (ucmlen) <= (unsigned long) \ ((mhdr)->msg_controllen - \ ((char *)(ucmsg) - (char *)(mhdr)->msg_control))) |