From: Brad Hubbard Date: Mon, 29 Jul 2013 08:05:52 +0000 (+0200) Subject: add newline char when two lines are concatenated X-Git-Tag: 4.2.1~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b10cba0e0af5b1e3e8cda0201d5563f085aab2a4;p=shadow add newline char when two lines are concatenated --- diff --git a/ChangeLog b/ChangeLog index 266112a7..bcb07fbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-07-29 Brad Hubbard + + * lib/groupio.c: add newline char when two lines + are concatenated + Closes: alioth#313942 + 2013-07-28 Guido Trentalancia * etc/login.defs: fix typographic errors and use a better format diff --git a/lib/groupio.c b/lib/groupio.c index 109c5886..244307fc 100644 --- a/lib/groupio.c +++ b/lib/groupio.c @@ -329,7 +329,7 @@ static /*@null@*/struct commonio_entry *merge_group_entries ( } /* Concatenate the 2 lines */ - new_line_len = strlen (gr1->line) + strlen (gr2->line) +1; + new_line_len = strlen (gr1->line) + strlen (gr2->line) +2; new_line = (char *)malloc ((new_line_len + 1) * sizeof(char*)); if (NULL == new_line) { errno = ENOMEM;