Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/top/dist Fix unitialized signal mask passed to ...



details:   https://anonhg.NetBSD.org/src/rev/631f0873e578
branches:  trunk
changeset: 319477:631f0873e578
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu May 31 09:20:05 2018 +0000

description:
Fix unitialized signal mask passed to sigaction(2) in top(1)

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by <Yang Zheng>

diffstat:

 external/bsd/top/dist/top.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r e283b3308ef9 -r 631f0873e578 external/bsd/top/dist/top.c
--- a/external/bsd/top/dist/top.c       Thu May 31 09:18:31 2018 +0000
+++ b/external/bsd/top/dist/top.c       Thu May 31 09:20:05 2018 +0000
@@ -135,6 +135,7 @@
 #ifdef HAVE_SIGACTION
     struct sigaction action;
 
+    sigemptyset(&action.sa_mask);
     action.sa_handler = handler;
     action.sa_flags = 0;
     (void) sigaction(sig, &action, NULL);



Home | Main Index | Thread Index | Old Index