1
0
Fork 0

yam: integer underflow in yam_ioctl()

We cap bitrate at YAM_MAXBITRATE in yam_ioctl(), but it could also be
negative.  I don't know the impact of using a negative bitrate but let's
prevent it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Dan Carpenter 2013-10-14 15:28:38 +03:00 committed by David S. Miller
parent dbbd2ad89b
commit 9e5f172190
1 changed files with 1 additions and 1 deletions

View File

@ -77,6 +77,6 @@ struct yamdrv_ioctl_cfg {
struct yamdrv_ioctl_mcs {
int cmd;
int bitrate;
unsigned int bitrate;
unsigned char bits[YAM_FPGA_SIZE];
};