From 2c461c8b05180765ef61dfa955c195ee29a442a0 Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] 0106-top: Fix snprintf() call in capsmk(). Replace "snprintf(msg, sizeof(pmt)" with "snprintf(msg, sizeof(msg)". Luckily sizeof(pmt) == sizeof(msg), but fix it anyway. --- top/top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/top/top.c b/top/top.c index 56b3d490..60613ca9 100644 --- a/top/top.c +++ b/top/top.c @@ -659,7 +659,7 @@ static void capsmk (WIN_t *q) { } else { q->capclr_sum[0] = '\0'; #ifdef USE_X_COLHDR - snprintf(q->capclr_msg, sizeof(q->capclr_pmt), "%s%s" + snprintf(q->capclr_msg, sizeof(q->capclr_msg), "%s%s" , Cap_reverse, q->cap_bold); #else STRLCPY(q->capclr_msg, Cap_reverse) -- 2.40.0