From 7b4d323092bd44bbca8f8cd96709dff89277f930 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 17 Jun 2017 09:54:54 +0200 Subject: [PATCH] Fix va_list processing in test_note() Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/3704) --- test/testutil/tests.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/testutil/tests.c b/test/testutil/tests.c index 3f66b3e3cd..7a923889d6 100644 --- a/test/testutil/tests.c +++ b/test/testutil/tests.c @@ -137,11 +137,13 @@ void test_error(const char *file, int line, const char *desc, ...) void test_note(const char *fmt, ...) { - va_list ap; - if (fmt != NULL) { + va_list ap; + test_printf_stderr("%*s# ", subtest_level(), ""); + va_start(ap, fmt); test_vprintf_stderr(fmt, ap); + va_end(ap); test_printf_stderr("\n"); } test_flush_stderr(); -- 2.25.1