projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
net/x25: fix incorrect parameter validation in the x25_getsockopt() function
[linux-2.6-microblaze.git]
/
net
/
x25
/
af_x25.c
diff --git
a/net/x25/af_x25.c
b/net/x25/af_x25.c
index
f7a7c77
..
d18d514
100644
(file)
--- a/
net/x25/af_x25.c
+++ b/
net/x25/af_x25.c
@@
-460,12
+460,12
@@
static int x25_getsockopt(struct socket *sock, int level, int optname,
if (get_user(len, optlen))
goto out;
- len = min_t(unsigned int, len, sizeof(int));
-
rc = -EINVAL;
if (len < 0)
goto out;
+ len = min_t(unsigned int, len, sizeof(int));
+
rc = -EFAULT;
if (put_user(len, optlen))
goto out;