SHA256
1
0
forked from pool/shadow
shadow/shadow-4.2.1-merge-group.patch

13 lines
418 B
Diff
Raw Normal View History

--- lib/groupio.c
+++ lib/groupio.c
@@ -335,8 +335,7 @@ static /*@null@*/struct commonio_entry *merge_group_entries (
errno = ENOMEM;
return NULL;
}
- snprintf(new_line, new_line_len, "%s\n%s", gr1->line, gr2->line);
- new_line[new_line_len] = '\0';
+ snprintf(new_line, new_line_len + 1, "%s\n%s", gr1->line, gr2->line);
/* Concatenate the 2 list of members */
for (i=0; NULL != gptr1->gr_mem[i]; i++);