readline: Fix potential buffer overflow
cread_add_char doesn't take the trailing '\0' into account, so adding
it at the end of readline can overflow the buffer.

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