Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f25bbaff authored by Kees Cook's avatar Kees Cook Committed by Mauro Carvalho Chehab
Browse files

[media] dib9000: fix potential format string leak



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

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 221ff3d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -649,7 +649,7 @@ static int dib9000_risc_debug_buf(struct dib9000_state *state, u16 * data, u8 si
	b[2 * (size - 2) - 1] = '\0';	/* Bullet proof the buffer */
	b[2 * (size - 2) - 1] = '\0';	/* Bullet proof the buffer */
	if (*b == '~') {
	if (*b == '~') {
		b++;
		b++;
		dprintk(b);
		dprintk("%s", b);
	} else
	} else
		dprintk("RISC%d: %d.%04d %s", state->fe_id, ts / 10000, ts % 10000, *b ? b : "<emtpy>");
		dprintk("RISC%d: %d.%04d %s", state->fe_id, ts / 10000, ts % 10000, *b ? b : "<emtpy>");
	return 1;
	return 1;