]> Git Repo - qemu.git/commitdiff
exec.c: Initialize sa_flags passed to sigaction()
authorPeter Maydell <[email protected]>
Tue, 15 May 2018 18:27:00 +0000 (19:27 +0100)
committerPaolo Bonzini <[email protected]>
Fri, 1 Jun 2018 13:13:46 +0000 (15:13 +0200)
Coverity points out that in the user-only version of cpu_abort() we
call sigaction() with a partially initialized struct sigaction
(CID 1005351). Correct the omission.

Signed-off-by: Peter Maydell <[email protected]>
Message-Id: <20180515182700[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
exec.c

diff --git a/exec.c b/exec.c
index ffa1099547bfa7555a122489df8d0da6800e8c91..bd8833fc9dfb9d81b43b319ec61dc63270834681 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -1124,6 +1124,7 @@ void cpu_abort(CPUState *cpu, const char *fmt, ...)
         struct sigaction act;
         sigfillset(&act.sa_mask);
         act.sa_handler = SIG_DFL;
+        act.sa_flags = 0;
         sigaction(SIGABRT, &act, NULL);
     }
 #endif
This page took 0.029803 seconds and 4 git commands to generate.