readline: Fix potential buffer overflow in command history
Cursor up copies the last line into the buffer without checking if it
fits into the current buffer. Fix this using safe_strncpy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e3ae12a commit 1cc4ba2aa100200e5cdae59fa397e09d22818da5
@Sascha Hauer Sascha Hauer authored on 14 Dec 2015
Showing 1 changed file
View
lib/readline.c