[git commit] ash: fix off-by-one in "jobs %4" handling. closes 7310
Denys Vlasenko
vda.linux at googlemail.com
Mon Sep 8 15:21:52 UTC 2014
commit: http://git.busybox.net/busybox/commit/?id=07f7ea70edd0fdc7ad7da36df3f487111e14d0d1
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/shell/ash.c b/shell/ash.c
index 293f151..705fe9f 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3647,7 +3647,7 @@ getjob(const char *name, int getctl)
if (is_number(p)) {
num = atoi(p);
- if (num < njobs) {
+ if (num <= njobs) {
jp = jobtab + num - 1;
if (jp->used)
goto gotit;
More information about the busybox-cvs
mailing list