]> granicus.if.org Git - procps-ng/commitdiff
ps/display.c: Fix "move process-only flags to the process".
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:22 +0000 (07:32 +1000)
Use "proc |= (task & PROC_ONLY)" not "proc |= (task &~ PROC_ONLY)".

ps/display.c

index bba539d4c874df253d481e33378e270918c7fc1f..28e1a6e6ee47fdee28356b4f339c58a226847782 100644 (file)
@@ -292,7 +292,7 @@ static void lists_and_needs(void){
   needs_for_sort = check_sort_needs(sort_list);
 
   // move process-only flags to the process
-  proc_format_needs |= (task_format_needs &~ PROC_ONLY_FLAGS);
+  proc_format_needs |= (task_format_needs & PROC_ONLY_FLAGS);
   task_format_needs &= ~PROC_ONLY_FLAGS;
 
   if(bsd_c_option){