Displaying 2 results from an estimated 2 matches for "7c324b76".
2019 Jan 25
0
[klibc:update-dash] jobs: Don't attempt to access job table for job %0
...ser <tklauser at distanz.ch>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/jobs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
index 1c6c6fbd..7c324b76 100644
--- a/usr/dash/jobs.c
+++ b/usr/dash/jobs.c
@@ -698,7 +698,7 @@ check:
if (is_number(p)) {
num = atoi(p);
- if (num <= njobs) {
+ if (num > 0 && num <= njobs) {
jp = jobtab + num - 1;
if (jp->used)
goto gotit;
2019 Jan 25
0
[klibc:update-dash] jobs: Handle string-based job descriptors
...tephen Kitt <steve at sk2.org>
Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/dash/jobs.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/usr/dash/jobs.c b/usr/dash/jobs.c
index 7c324b76..5e080f6a 100644
--- a/usr/dash/jobs.c
+++ b/usr/dash/jobs.c
@@ -713,9 +713,7 @@ check:
}
found = 0;
- while (1) {
- if (!jp)
- goto err;
+ while (jp) {
if (match(jp->ps[0].cmd, p)) {
if (found)
goto err;
@@ -725,6 +723,10 @@ check:
jp = jp->prev_job;
}
+ if (!foun...