Commit 760bddfb authored by Ravikiran G. Thirumalai's avatar Ravikiran G. Thirumalai Committed by David S. Miller

[TUN]: Fix signedness error in tun_get_user().

parent 8980383c
......@@ -179,7 +179,7 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv,
size_t len = count;
if (!(tun->flags & TUN_NO_PI)) {
if ((len -= sizeof(pi)) < 0)
if ((len -= sizeof(pi)) > len)
return -EINVAL;
memcpy_fromiovec((void *)&pi, iv, sizeof(pi));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment