[patch] yam: integer underflow in yam_ioctl()

Subsystems: the rest

STALE4678d

2 messages, 2 authors, 2013-10-17 · open the first message on its own page

[patch] yam: integer underflow in yam_ioctl()

From: Dan Carpenter <hidden>
Date: 2013-10-14 12:28:38

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 <redacted>
diff --git a/include/linux/yam.h b/include/linux/yam.h
index 7fe2822..512cdc2 100644
--- a/include/linux/yam.h
+++ b/include/linux/yam.h
@@ -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];
 };

Re: [patch] yam: integer underflow in yam_ioctl()

From: David Miller <davem@davemloft.net>
Date: 2013-10-17 19:54:22

From: Dan Carpenter <redacted>
Date: Mon, 14 Oct 2013 15:28:38 +0300
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 <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help