From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOR8h-0003ol-1J for qemu-devel@nongnu.org; Thu, 31 May 2018 13:13:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOR8g-0000M2-8Q for qemu-devel@nongnu.org; Thu, 31 May 2018 13:13:27 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:59684 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOR8g-0000LR-3w for qemu-devel@nongnu.org; Thu, 31 May 2018 13:13:26 -0400 From: Paolo Bonzini Date: Thu, 31 May 2018 19:12:33 +0200 Message-Id: <20180531171253.21012-34-pbonzini@redhat.com> In-Reply-To: <20180531171253.21012-1-pbonzini@redhat.com> References: <20180531171253.21012-1-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 33/53] exec.c: Initialize sa_flags passed to sigaction() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell From: Peter Maydell 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 --- exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec.c b/exec.c index ffa1099547..bd8833fc9d 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 -- 2.17.0