[git commit] ash: fix 'trap - 65'

Denys Vlasenko vda.linux at googlemail.com
Sat Jul 1 19:09:27 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=e9aba3e7ea4936278188555332654796e5b5e873
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/ash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;


More information about the busybox-cvs mailing list