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.
This commit is contained in:
Qualys Security Advisory 1970-01-01 00:00:00 +00:00 committed by Craig Small
parent 131e5e2fe6
commit d69966962c

View File

@ -836,7 +836,7 @@ static void capsmk (WIN_t *q) {
} else { } else {
q->capclr_sum[0] = '\0'; q->capclr_sum[0] = '\0';
#ifdef USE_X_COLHDR #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); , Cap_reverse, q->cap_bold);
#else #else
STRLCPY(q->capclr_msg, Cap_reverse) STRLCPY(q->capclr_msg, Cap_reverse)