From dd175b6881c2203d9bf31f6f98a3067174ea4e1d Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 25 Mar 2018 15:15:37 -0300 Subject: [PATCH] Fix overflow for signals >= 100. Thanks to @gzip4 for tracking this down. Closes #764. --- SignalsPanel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SignalsPanel.c b/SignalsPanel.c index fea2ac72..2bfbcbf2 100644 --- a/SignalsPanel.c +++ b/SignalsPanel.c @@ -41,10 +41,10 @@ Panel* SignalsPanel_new() { } #if (defined(SIGRTMIN) && defined(SIGRTMAX)) if (SIGRTMAX - SIGRTMIN <= 100) { - static char buf[15]; + static char buf[16]; for (int sig = SIGRTMIN; sig <= SIGRTMAX; i++, sig++) { int n = sig - SIGRTMIN; - xSnprintf(buf, 15, "%2d SIGRTMIN%-+3d", sig, n); + xSnprintf(buf, 16, "%2d SIGRTMIN%-+3d", sig, n); if (n == 0) { buf[11] = '\0'; }