From: Peter Maydell Date: Tue, 15 May 2018 18:27:00 +0000 (+0100) Subject: exec.c: Initialize sa_flags passed to sigaction() X-Git-Tag: v3.0.0-rc0~117^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8347c18506c3f8619527d19134cb4aac071dc54a;p=thirdparty%2Fqemu.git exec.c: Initialize sa_flags passed to sigaction() 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 Message-Id: <20180515182700.31736-1-peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini --- diff --git a/exec.c b/exec.c index ffa1099547b..bd8833fc9df 100644 --- 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