[v2.1.1] Merge branch 'patch' (patch release)

This patch fixes accesses over freed assert messages, causing the TAP
output to be broken.
This commit is contained in:
Snaipe 2015-11-25 12:34:55 +01:00
commit c690f963b2
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2015-11-25 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>
* criterion: version 2.1.1
* Fix: Fixed bug where the TAP output access the assert message after
it has been freed, causing it to print garbage.
2015-09-21 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>
* criterion: version 2.1.0

View file

@ -183,6 +183,7 @@ static void push_assert(s_glob_stats *stats,
s_assert_stats *dup = smalloc(sizeof (s_assert_stats));
memcpy(dup, data, sizeof (s_assert_stats));
dup->message = strdup(data->message);
dup->next = test->asserts;
test->asserts = dup;