diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-08-13 14:18:06 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2021-09-23 14:42:55 +0200 |
commit | 819121b9b08a41ccfcde2e18eb782f8f6b2912f1 (patch) | |
tree | 6d86ab6f7041fc547ab88d2fc2b98a93701e03a1 | |
parent | babe6d5c88b587d30f72f31a81ce87610b68e952 (diff) | |
download | qemu-819121b9b08a41ccfcde2e18eb782f8f6b2912f1.zip qemu-819121b9b08a41ccfcde2e18eb782f8f6b2912f1.tar.gz qemu-819121b9b08a41ccfcde2e18eb782f8f6b2912f1.tar.bz2 |
linux-user: Zero out target_siginfo_t in force_sig()
The target_siginfo_t we populate in force_sig() will eventually
get copied onto the target's stack. Zero it out so that any extra
padding in the sifields union is consistently zero when the guest
sees it.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210813131809.28655-5-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r-- | linux-user/signal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c index f8346f5..910b9dc 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -641,7 +641,7 @@ void force_sig(int sig) { CPUState *cpu = thread_cpu; CPUArchState *env = cpu->env_ptr; - target_siginfo_t info; + target_siginfo_t info = {}; info.si_signo = sig; info.si_errno = 0; |