diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-05 06:41:50 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:01 -0500 |
commit | b873e1a3ccf9e04d2de85db0d510ec4b793fe569 (patch) | |
tree | 7f5e324fdfab0d11165486230407f7d55f85f855 /drivers/media/video/tuner-xc2028.c | |
parent | e7a2bc8a756e5c0adc6804dd7702442a06174b74 (diff) |
V4L/DVB (6559): Fix a buffer overflow at xc2028_get_reg
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tuner-xc2028.c')
-rw-r--r-- | drivers/media/video/tuner-xc2028.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index 80d14020c78d..b4c88ed12a8a 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c | |||
@@ -94,13 +94,13 @@ struct xc2028_data { | |||
94 | static int xc2028_get_reg(struct xc2028_data *priv, u16 reg) | 94 | static int xc2028_get_reg(struct xc2028_data *priv, u16 reg) |
95 | { | 95 | { |
96 | int rc; | 96 | int rc; |
97 | unsigned char buf[1]; | 97 | unsigned char buf[2]; |
98 | 98 | ||
99 | tuner_info("%s called\n", __FUNCTION__); | 99 | tuner_info("%s called\n", __FUNCTION__); |
100 | 100 | ||
101 | buf[0] = reg; | 101 | buf[0] = reg; |
102 | 102 | ||
103 | i2c_send(rc, priv, buf, sizeof(buf)); | 103 | i2c_send(rc, priv, buf, 1); |
104 | if (rc < 0) | 104 | if (rc < 0) |
105 | return rc; | 105 | return rc; |
106 | 106 | ||