Commit b873e1a3 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (6559): Fix a buffer overflow at xc2028_get_reg

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent e7a2bc8a
...@@ -94,13 +94,13 @@ struct xc2028_data { ...@@ -94,13 +94,13 @@ struct xc2028_data {
static int xc2028_get_reg(struct xc2028_data *priv, u16 reg) static int xc2028_get_reg(struct xc2028_data *priv, u16 reg)
{ {
int rc; int rc;
unsigned char buf[1]; unsigned char buf[2];
tuner_info("%s called\n", __FUNCTION__); tuner_info("%s called\n", __FUNCTION__);
buf[0] = reg; buf[0] = reg;
i2c_send(rc, priv, buf, sizeof(buf)); i2c_send(rc, priv, buf, 1);
if (rc < 0) if (rc < 0)
return rc; return rc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment