Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] dib9000: fix potential format string leak

Make sure that a format string cannot accidentally
leak into the printk buffer.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

authored by

Kees Cook and committed by
Mauro Carvalho Chehab
f25bbaff 221ff3d0

+1 -1
+1 -1
drivers/media/dvb-frontends/dib9000.c
··· 649 649 b[2 * (size - 2) - 1] = '\0'; /* Bullet proof the buffer */ 650 650 if (*b == '~') { 651 651 b++; 652 - dprintk(b); 652 + dprintk("%s", b); 653 653 } else 654 654 dprintk("RISC%d: %d.%04d %s", state->fe_id, ts / 10000, ts % 10000, *b ? b : "<emtpy>"); 655 655 return 1;