Commit 78308a4a authored by Alexander Shiyan's avatar Alexander Shiyan Committed by Willy Tarreau

stb6100: fix buffer length check in stb6100_write_reg_range()

commit 7e6bd12f upstream.

We are checking sizeof() the wrong variable!
Signed-off-by: default avatarAlexander Shiyan <shc_work@mail.ru>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent d55534bf
...@@ -193,7 +193,7 @@ static int stb6100_write_reg_range(struct stb6100_state *state, u8 buf[], int st ...@@ -193,7 +193,7 @@ static int stb6100_write_reg_range(struct stb6100_state *state, u8 buf[], int st
.len = len + 1 .len = len + 1
}; };
if (1 + len > sizeof(buf)) { if (1 + len > sizeof(cmdbuf)) {
printk(KERN_WARNING printk(KERN_WARNING
"%s: i2c wr: len=%d is too big!\n", "%s: i2c wr: len=%d is too big!\n",
KBUILD_MODNAME, len); KBUILD_MODNAME, len);
......
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