Skip to content
Snippets Groups Projects
Commit 81b424d9 authored by David S. Miller's avatar David S. Miller
Browse files

isdn: mISDN: socket: Fix set-but-unused variables.


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: default avatarDavid S. Miller <davem@davemloft.net>
parent 07f46f80
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment