summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 9681111..22c7260 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -12967,7 +12967,7 @@ trapcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
exitcode = 0;
while (*ap) {
signo = get_signum(*ap);
- if (signo < 0) {
+ if (signo < 0 || signo >= NSIG) {
/* Mimic bash message exactly */
ash_msg("%s: invalid signal specification", *ap);
exitcode = 1;