summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2018-03-25 15:15:37 -0300
committerHisham Muhammad <hisham@gobolinux.org>2018-04-06 11:13:30 -0300
commitdd175b6881c2203d9bf31f6f98a3067174ea4e1d (patch)
treea4398b535e79c29034f9d83410abd0eda90bd53b
parent7ad9701a126be5f819bc3dd280cc990604959712 (diff)
Fix overflow for signals >= 100.
Thanks to @gzip4 for tracking this down. Closes #764.
-rw-r--r--SignalsPanel.c4
1 files 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';
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy