From 713381b10d3f4c58a44a1f05b15c18d81be870c5 Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] top: Protect macro parameters. --- top/top.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/top/top.c b/top/top.c index c7cf434d..01978e76 100644 --- a/top/top.c +++ b/top/top.c @@ -5920,8 +5920,8 @@ static int window_show (WIN_t *q, int wmax) { /* the isBUSY macro determines if a task is 'active' -- it returns true if some cpu was used since the last sample. ( actual 'running' tasks will be a subset of those selected ) */ - #define isBUSY(x) (0 < x->pcpu) - #define winMIN(a,b) ((a < b) ? a : b) + #define isBUSY(x) (0 < (x)->pcpu) + #define winMIN(a,b) (((a) < (b)) ? (a) : (b)) int i, lwin; // Display Column Headings -- and distract 'em while we sort (maybe)