projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07f46f8
)
isdn: mISDN: socket: Fix set-but-unused variables.
author
David S. Miller
<davem@davemloft.net>
Sun, 17 Apr 2011 23:48:53 +0000
(16:48 -0700)
committer
David S. Miller
<davem@davemloft.net>
Sun, 17 Apr 2011 23:48:53 +0000
(16:48 -0700)
The variable 'len' is set but unused in data_sock_getsockopt().
The code should use 'len' to validate that the user's socket option is
indeed the right size.
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/mISDN/socket.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/isdn/mISDN/socket.c
b/drivers/isdn/mISDN/socket.c
index 7446d8b4282d58cee32d435c930c23b1b43092a4..8e325227b4c01153715f396662aeebea5231a219 100644
(file)
--- a/
drivers/isdn/mISDN/socket.c
+++ b/
drivers/isdn/mISDN/socket.c
@@
-457,6
+457,9
@@
static int data_sock_getsockopt(struct socket *sock, int level, int optname,
if (get_user(len, optlen))
return -EFAULT;
+ if (len != sizeof(char))
+ return -EINVAL;
+
switch (optname) {
case MISDN_TIME_STAMP:
if (_pms(sk)->cmask & MISDN_TIME_STAMP)