Skip to content

Commit

Permalink
yam: integer underflow in yam_ioctl()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Oct 17, 2013
1 parent dbbd2ad commit 9e5f172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/yam.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
};

0 comments on commit 9e5f172

Please sign in to comment.