Skip to content

Commit

Permalink
[v2.1.1] Merge branch 'patch' (patch release)
Browse files Browse the repository at this point in the history
This patch fixes accesses over freed assert messages, causing the TAP
output to be broken.
  • Loading branch information
Snaipe committed Nov 25, 2015
2 parents 3148348 + 6f9d29a commit 6a766ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2015-11-25 Franklin "Snaipe" Mathieu <[email protected]>

* 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 <[email protected]>

* criterion: version 2.1.0
Expand Down
1 change: 1 addition & 0 deletions src/core/stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6a766ca

Please sign in to comment.