The length of the concatenated 2 lines was correct.
This commit is contained in:
Nicolas François 2013-08-05 23:16:00 +02:00
parent c0ce911b5e
commit 5d491ef9da
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-08-05 Nicolas François <nicolas.francois@centraliens.net>
* lib/groupio.c: Revert change from 2013-07-29. The length of the
concatenated 2 lines was correct.
2013-08-05 Nicolas François <nicolas.francois@centraliens.net> 2013-08-05 Nicolas François <nicolas.francois@centraliens.net>
* libmisc/salt.c: random() max value is 2^31-1 (same as RAND_MAX * libmisc/salt.c: random() max value is 2^31-1 (same as RAND_MAX

View File

@ -329,7 +329,7 @@ static /*@null@*/struct commonio_entry *merge_group_entries (
} }
/* Concatenate the 2 lines */ /* Concatenate the 2 lines */
new_line_len = strlen (gr1->line) + strlen (gr2->line) +2; new_line_len = strlen (gr1->line) + strlen (gr2->line) +1;
new_line = (char *)malloc (new_line_len + 1); new_line = (char *)malloc (new_line_len + 1);
if (NULL == new_line) { if (NULL == new_line) {
errno = ENOMEM; errno = ENOMEM;