Sat Jun 9 15:37:57 2018 UTC ()
Pull up following revision(s) (requested by kamil in ticket #871):

	external/bsd/top/dist/top.c: revision 1.10

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>


(martin)
diff -r1.9 -r1.9.24.1 src/external/bsd/top/dist/top.c

cvs diff -r1.9 -r1.9.24.1 src/external/bsd/top/dist/top.c (expand / switch to unified diff)

--- src/external/bsd/top/dist/top.c 2012/03/23 14:46:05 1.9
+++ src/external/bsd/top/dist/top.c 2018/06/09 15:37:57 1.9.24.1
@@ -125,26 +125,27 @@ quit(int status) @@ -125,26 +125,27 @@ quit(int status)
125} 125}
126 126
127/* 127/*
128 * signal handlers 128 * signal handlers
129 */ 129 */
130 130
131static void 131static void
132set_signal(int sig, RETSIGTYPE (*handler)(int)) 132set_signal(int sig, RETSIGTYPE (*handler)(int))
133 133
134{ 134{
135#ifdef HAVE_SIGACTION 135#ifdef HAVE_SIGACTION
136 struct sigaction action; 136 struct sigaction action;
137 137
 138 sigemptyset(&action.sa_mask);
138 action.sa_handler = handler; 139 action.sa_handler = handler;
139 action.sa_flags = 0; 140 action.sa_flags = 0;
140 (void) sigaction(sig, &action, NULL); 141 (void) sigaction(sig, &action, NULL);
141#else 142#else
142 (void) signal(sig, handler); 143 (void) signal(sig, handler);
143#endif 144#endif
144} 145}
145 146
146static void 147static void
147release_signal(int sig) 148release_signal(int sig)
148 149
149{ 150{
150#ifdef HAVE_SIGACTION 151#ifdef HAVE_SIGACTION