Skip to content

Commit 6a766ca

Browse files
committed
[v2.1.1] Merge branch 'patch' (patch release)
This patch fixes accesses over freed assert messages, causing the TAP output to be broken.
2 parents 3148348 + 6f9d29a commit 6a766ca

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2015-11-25 Franklin "Snaipe" Mathieu <[email protected]>
2+
3+
* criterion: version 2.1.1
4+
* Fix: Fixed bug where the TAP output access the assert message after
5+
it has been freed, causing it to print garbage.
6+
17
2015-09-21 Franklin "Snaipe" Mathieu <[email protected]>
28

39
* criterion: version 2.1.0

src/core/stats.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ static void push_assert(s_glob_stats *stats,
183183

184184
s_assert_stats *dup = smalloc(sizeof (s_assert_stats));
185185
memcpy(dup, data, sizeof (s_assert_stats));
186+
dup->message = strdup(data->message);
186187

187188
dup->next = test->asserts;
188189
test->asserts = dup;

0 commit comments

Comments
 (0)