From ffcdb61211b6f9b142ff09928d8c2e546c41f576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Tue, 24 Oct 2017 11:33:43 +0200 Subject: [PATCH] tests/posix_semaphore: test4: BUG add '\0' after fmt_u64_dec fmt_u64_dec does not include the terminating null string character. --- tests/posix_semaphore/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/posix_semaphore/main.c b/tests/posix_semaphore/main.c index a37752513cef..185a43b3db5e 100644 --- a/tests/posix_semaphore/main.c +++ b/tests/posix_semaphore/main.c @@ -261,7 +261,7 @@ void test4(void) } } stop = xtimer_now_usec64() - start; - fmt_u64_dec(uint64_str, stop); + uint64_str[fmt_u64_dec(uint64_str, stop)] = '\0'; if (stop < (exp - 100)) { printf("first: waited only %s usec => FAILED\n", uint64_str); }