--- zzzz-none-000/linux-3.10.107/drivers/char/lp.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/char/lp.c 2021-02-04 17:41:59.000000000 +0000 @@ -587,6 +587,8 @@ return -ENODEV; switch ( cmd ) { case LPTIME: + if (arg > UINT_MAX / HZ) + return -EINVAL; LP_TIME(minor) = arg * HZ/100; break; case LPCHAR: @@ -857,11 +859,7 @@ } else if (!strcmp(str, "auto")) { parport_nr[0] = LP_PARPORT_AUTO; } else if (!strcmp(str, "none")) { - if (parport_ptr < LP_NO) - parport_nr[parport_ptr++] = LP_PARPORT_NONE; - else - printk(KERN_INFO "lp: too many ports, %s ignored.\n", - str); + parport_nr[parport_ptr++] = LP_PARPORT_NONE; } else if (!strcmp(str, "reset")) { reset = 1; }