ash: fix 'trap - 65'

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2017-07-01 21:09:27 +02:00
parent ba4fbca8a8
commit e9aba3e7ea

View File

@ -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;