base: remove superfluous line feeds in print_lines

Fixes #2279
This commit is contained in:
Johannes Schlatow 2017-02-10 17:52:52 +01:00 committed by Norman Feske
parent eda0828ca0
commit 762728fee0

View File

@ -85,7 +85,7 @@ void Genode::print_lines(char const *string, size_t len, FUNC const &func)
* Copy line from (untrusted) caller to local line buffer * Copy line from (untrusted) caller to local line buffer
*/ */
char line_buf[MAX_LINE_LEN]; char line_buf[MAX_LINE_LEN];
Genode::strncpy(line_buf, string, Genode::min(line_len + 1, sizeof(line_buf))); Genode::strncpy(line_buf, string, Genode::min(line_len, sizeof(line_buf)));
func(line_buf); func(line_buf);
string += line_len; string += line_len;