aboutsummaryrefslogtreecommitdiff
path: root/linux-user/signal.c
diff options
context:
space:
mode:
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];
}