summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko2014-09-08 17:21:52 +0200
committerDenys Vlasenko2014-09-08 17:21:52 +0200
commit07f7ea70edd0fdc7ad7da36df3f487111e14d0d1 (patch)
tree4c78dc48e0ac5e3618c3b8270b604a4d3937cde0 /shell/ash.c
parent2ec34969e73c5262e20d3b4599196ff03913e66e (diff)
downloadbusybox-07f7ea70edd0fdc7ad7da36df3f487111e14d0d1.zip
busybox-07f7ea70edd0fdc7ad7da36df3f487111e14d0d1.tar.gz
ash: fix off-by-one in "jobs %4" handling. closes 7310
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c2
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;