diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2015-01-05 14:00:01 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-01-06 23:51:01 +0100 |
commit | 38dc59907b50f1717b3634ab3a99499a52819e3f (patch) | |
tree | 38947ce522dd2ee02a85b64d51480d150c95ae87 /Src/jobs.c | |
parent | c425cc9632fc475e3117cf96e69e2510be5d80c0 (diff) | |
download | zsh-38dc59907b50f1717b3634ab3a99499a52819e3f.tar.gz zsh-38dc59907b50f1717b3634ab3a99499a52819e3f.tar.xz zsh-38dc59907b50f1717b3634ab3a99499a52819e3f.zip |
34120: compctl, jobs: Check contents instead of array
text is an array in the struct, and can never be null. Found by Coverity (Issue 1255780).
Diffstat (limited to 'Src/jobs.c')
-rw-r--r-- | Src/jobs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/jobs.c b/Src/jobs.c index c6e1bce15..295f4c939 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -2718,7 +2718,7 @@ findjobnam(const char *s) for (jobnum = maxjob; jobnum >= 0; jobnum--) if (!(jobtab[jobnum].stat & (STAT_SUBJOB | STAT_NOPRINT)) && jobtab[jobnum].stat && jobtab[jobnum].procs && jobnum != thisjob && - jobtab[jobnum].procs->text && strpfx(s, jobtab[jobnum].procs->text)) + jobtab[jobnum].procs->text[0] && strpfx(s, jobtab[jobnum].procs->text)) return jobnum; return -1; } |