From 7d0358475deed393a9f27ca5d9d5055c795df470 Mon Sep 17 00:00:00 2001 From: Zhang Xianyi Date: Sun, 22 May 2016 01:08:44 +0800 Subject: [PATCH] Merge the patch for musl libc. --- utest/ctest.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utest/ctest.h b/utest/ctest.h index a62103ff5..1deea32f6 100644 --- a/utest/ctest.h +++ b/utest/ctest.h @@ -637,7 +637,7 @@ static void *find_symbol(struct ctest *test, const char *fname) static void sighandler(int signum) { char msg[128]; - sprintf(msg, "[SIGNAL %d: %s]", signum, sys_siglist[signum]); + snprintf(msg, sizeof(msg), "[SIGNAL %d: %s]", signum, strsignal(signum)); color_print(ANSI_BRED, msg); fflush(stdout);