Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: David S. Miller <davem@davemloft.net>

+3
+3
drivers/isdn/mISDN/socket.c
··· 457 457 if (get_user(len, optlen)) 458 458 return -EFAULT; 459 459 460 + if (len != sizeof(char)) 461 + return -EINVAL; 462 + 460 463 switch (optname) { 461 464 case MISDN_TIME_STAMP: 462 465 if (_pms(sk)->cmask & MISDN_TIME_STAMP)