Skip to content
Commit 08d60e59 authored by John Ogness's avatar John Ogness Committed by Petr Mladek
Browse files

printk: fix string termination for record_print_text()

Commit f0e386ee ("printk: fix buffer overflow potential for
print_text()") added string termination in record_print_text().
However it used the wrong base pointer for adding the terminator.
This led to a 0-byte being written somewhere beyond the buffer.

Use the correct base pointer when adding the terminator.

Fixes: f0e386ee

 ("printk: fix buffer overflow potential for print_text()")
Reported-by: default avatarSven Schnelle <svens@linux.ibm.com>
Signed-off-by: default avatarJohn Ogness <john.ogness@linutronix.de>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210124202728.4718-1-john.ogness@linutronix.de
parent f0e386ee
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