From cef6b642b92460a14418d693066109e3b01d36a1 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Fri, 11 Jun 2010 21:31:08 -0700 Subject: [PATCH] top - Fix seg-fault when window made very wide * Fix a static buffer overflow when the window is made very wide. Taken-from: NetBSD Submitted-by: Trevor Kendall --- usr.bin/top/m_dragonfly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/top/m_dragonfly.c b/usr.bin/top/m_dragonfly.c index a1b4f8fff9..c23d019ffb 100644 --- a/usr.bin/top/m_dragonfly.c +++ b/usr.bin/top/m_dragonfly.c @@ -526,7 +526,7 @@ get_process_info(struct system_info *si, struct process_select *sel, return ((caddr_t) & handle); } -char fmt[128]; /* static area where result is built */ +char fmt[MAX_COLS]; /* static area where result is built */ char * format_next_process(caddr_t xhandle, char *(*get_userid) (int)) -- 2.41.0