From: Denys Vlasenko Date: Mon, 8 Sep 2014 15:21:52 +0000 (+0200) Subject: ash: fix off-by-one in "jobs %4" handling. closes 7310 X-Git-Tag: 1_23_0~53 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=07f7ea70edd0fdc7ad7da36df3f487111e14d0d1;p=oweals%2Fbusybox.git ash: fix off-by-one in "jobs %4" handling. closes 7310 Signed-off-by: Denys Vlasenko --- diff --git a/shell/ash.c b/shell/ash.c index 293f15147..705fe9fa4 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;