From: Mauro Carvalho Chehab Date: Mon, 5 Nov 2007 11:41:50 +0000 (-0300) Subject: V4L/DVB (6559): Fix a buffer overflow at xc2028_get_reg X-Git-Tag: v2.6.25-rc1~1235^2~398 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b873e1a3ccf9e04d2de85db0d510ec4b793fe569;p=linux-2.6 V4L/DVB (6559): Fix a buffer overflow at xc2028_get_reg Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/tuner-xc2028.c b/drivers/media/video/tuner-xc2028.c index 80d14020c7..b4c88ed12a 100644 --- a/drivers/media/video/tuner-xc2028.c +++ b/drivers/media/video/tuner-xc2028.c @@ -94,13 +94,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;