aboutsummaryrefslogtreecommitdiff
path: root/linux-user/signal.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-07-10 10:54:09 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-10 10:54:09 -0500
commit9f9a03b9818194da39c6759d9b0cbee5d7ace4e1 (patch)
tree8480f4d8fb85216f98e6503f7648fba7ee008e6e /linux-user/signal.c
parent6272d17c420b8cdd6af1784edd34f0b3e9f26b76 (diff)
parent8384274eda1d7cb01f326143fa6118562c1eb5be (diff)
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
# By Andreas Schwab (2) and others # Via Riku Voipio * riku/linux-user-for-upstream: linux-user: Do not ignore mmap failure from host linux-user: improve target_to_host_sock_type conversion user-exec.c: Set is_write correctly in the ARM cpu_signal_handler() linux-user: Fix sys_utimensat (would not compile on old glibc) linux-user: fix signal number range check linux-user: add SIOCADDRT/SIOCDELRT support linux-user: handle /proc/$$ like /proc/self Message-id: cover.1373051589.git.riku.voipio@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r--linux-user/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index c4e20dc8b9..d84e189bc8 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -102,14 +102,14 @@ static inline int sas_ss_flags(unsigned long sp)
int host_to_target_signal(int sig)
{
- if (sig >= _NSIG)
+ if (sig < 0 || sig >= _NSIG)
return sig;
return host_to_target_signal_table[sig];
}
int target_to_host_signal(int sig)
{
- if (sig >= _NSIG)
+ if (sig < 0 || sig >= _NSIG)
return sig;
return target_to_host_signal_table[sig];
}