summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-11-05 09:41:50 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-11-05 09:41:50 -0200
commit1bdffce920587848c68bbb979ffea43897b6f69d (patch)
treeb24bdbbdfe22ced6218fa8fd282a8264f2c6da27 /linux
parent9cf5ea39af8b2066fc3d85fdae32ef96c513cfc9 (diff)
downloadmediapointer-dvb-s2-1bdffce920587848c68bbb979ffea43897b6f69d.tar.gz
mediapointer-dvb-s2-1bdffce920587848c68bbb979ffea43897b6f69d.tar.bz2
Fix a buffer overflow at xc2028_get_reg
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/tuner-xc2028.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/tuner-xc2028.c b/linux/drivers/media/video/tuner-xc2028.c
index 87ed88b38..8bfce9f7e 100644
--- a/linux/drivers/media/video/tuner-xc2028.c
+++ b/linux/drivers/media/video/tuner-xc2028.c
@@ -106,13 +106,13 @@ struct xc2028_data {
static int xc2028_get_reg(struct xc2028_data *priv, u16 reg)
{
int rc;
- unsigned char buf[1];
+ unsigned char buf[2];
tuner_info("%s called\n", __FUNCTION__);
buf[0] = reg;
- i2c_send(rc, priv, buf, sizeof(buf));
+ i2c_send(rc, priv, buf, 1);
if (rc < 0)
return rc;