diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-09 23:47:31 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-13 03:03:14 -0700 |
commit | 4ffa87012efd7b664762b579213d4663560ef4a3 (patch) | |
tree | 37e255f778b1bda29341799b6aa209e62ce69f84 /net/can | |
parent | dac876193cd79ced36d0462749ea47c05844fb49 (diff) | |
download | op-kernel-dev-4ffa87012efd7b664762b579213d4663560ef4a3.zip op-kernel-dev-4ffa87012efd7b664762b579213d4663560ef4a3.tar.gz |
can: avoids a false warning
At this point optlen == sizeof(sfilter) but some compilers are dumb.
Reported-by: Németh Márton <nm127@freemail.h
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/can')
-rw-r--r-- | net/can/raw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/can/raw.c b/net/can/raw.c index 3a7dffb..da99cf1 100644 --- a/net/can/raw.c +++ b/net/can/raw.c @@ -445,7 +445,7 @@ static int raw_setsockopt(struct socket *sock, int level, int optname, return -EFAULT; } } else if (count == 1) { - if (copy_from_user(&sfilter, optval, optlen)) + if (copy_from_user(&sfilter, optval, sizeof(sfilter))) return -EFAULT; } |