From 76fd93726c4e5429d84532c4a96a312db2ed668d Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Thu, 7 Jun 2018 11:46:53 -0400 Subject: [PATCH] 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. Backports commit 8347c18506c3f8619527d19134cb4aac071dc54a from qemu --- qemu/exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qemu/exec.c b/qemu/exec.c index 6d95c776..3475c86d 100644 --- a/qemu/exec.c +++ b/qemu/exec.c @@ -939,6 +939,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