]> granicus.if.org Git - check/commit
Add test case where %n is passed into a ck_assert call
authorBranden Archer <b.m.archer4@gmail.com>
Thu, 26 May 2016 03:15:17 +0000 (23:15 -0400)
committerBranden Archer <brarcher@lexmark.com>
Thu, 26 May 2016 03:28:40 +0000 (23:28 -0400)
commita6c2f350e6949321389d1ca3b721024573fe6809
tree41d95c79d885d8070e4c70b4dd65fb698fff5219
parentfd76ee676de2ba1633589ba2bd4908ab93c09ae1
Add test case where %n is passed into a ck_assert call

In the past it was possible to cause issues if arguments
were passed into ck_assert* macros which included %n.
Exist unit tests check for output format options, such as
%d and %f. No test existed for %n, which writes a value to
memory if used.

Ulrich Eckhardt observed that passing something with a %n in it
would result in issues running Check 0.9.10. Although the
issue is already resolved, this commit adds the test case mentioned in
Ulrich's GitHub issue: https://github.com/libcheck/check/issues/41
tests/check_check_master.c
tests/check_check_sub.c