|
|
|
ax25: non working tests on unsigned ax25_ctl.arg | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
vi include/linux/ax25.h +77 and note that ax25_ctl.arg is unsigned, should there maybe be a test if (ax25_ctl.arg > MAX) return -EINVAL; (and what should MAX be then?) Otherwise you may want to apply the cleanup patch below Roel ------------------------------>8-------------8<--------------------------------- Remove redundant tests on unsigned Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> --- diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index fd9d06f..9964df3 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -418,14 +418,10 @@ static int ax25_ctl_ioctl(const unsigned int cmd, void __user *arg) break; case AX25_T3: - if (ax25_ctl.arg < 0) - return -EINVAL; ax25->t3 = ax25_ctl.arg * HZ; break; case AX25_IDLE: - if (ax25_ctl.arg < 0) - return -EINVAL; ax25->idle = ax25_ctl.arg * 60 * HZ; break; -- To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
[Site Home] [Linux Newbie] [Kernel Newbies] [Memory] [Git] [Security] [Netfilter] [Linux Admin] [Bugtraq] [Rubini] [Photo] [Yosemite] [Yosemite News] [MIPS Linux] [ARM Linux] [ARM Linux Kernel] [Linux Networking] [Linux Security] [Linux RAID] [Samba] [Video 4 Linux] [Linux Resources]
![]() |
![]() |