From fe28fcf04cdfe7c6e1ab4499a33f9b8479839f14 Mon Sep 17 00:00:00 2001 From: Marc Hoersken Date: Sat, 18 Apr 2020 21:42:05 +0200 Subject: tests/server/util.c: use raise instead of calling signal handler Use raise to trigger signal handler instead of calling it directly and causing potential unexpected control flow. Reviewed-by: Jay Satiro Part of #5260 --- tests/server/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/server/util.c b/tests/server/util.c index 09bb515b4..99aa1de40 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -632,7 +632,7 @@ static BOOL WINAPI ctrl_event_handler(DWORD dwCtrlType) } if(signum) { logmsg("ctrl_event_handler: %d -> %d", dwCtrlType, signum); - exit_signal_handler(signum); + raise(signum); } return TRUE; } @@ -656,7 +656,7 @@ static LRESULT CALLBACK main_window_proc(HWND hwnd, UINT uMsg, } if(signum) { logmsg("main_window_proc: %d -> %d", uMsg, signum); - exit_signal_handler(signum); + raise(signum); } } return DefWindowProc(hwnd, uMsg, wParam, lParam); -- cgit v1.2.3