diff options
author | steve <steve@FreeBSD.org> | 1997-08-11 02:29:50 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1997-08-11 02:29:50 +0000 |
commit | 6cd5fcd54b701fa5699b918a862ba94fe376acfa (patch) | |
tree | ea2253dde783ae979f62353142f2cda6730eb4b8 /bin/ps | |
parent | f880a4a55fed03e20dda357d9a4e7746c55157df (diff) | |
download | FreeBSD-src-6cd5fcd54b701fa5699b918a862ba94fe376acfa.zip FreeBSD-src-6cd5fcd54b701fa5699b918a862ba94fe376acfa.tar.gz |
Fix seg fault when invalid keywords are used.
PR: bin/4253
Submitted by: Jesse Rosenstock <jmr@ugcs.caltech.edu>
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/keyword.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index bd045e6..78bab68 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: keyword.c,v 1.14 1997/03/04 00:33:56 ache Exp $ + * $Id: keyword.c,v 1.15 1997/04/29 05:26:04 jkh Exp $ */ #ifndef lint @@ -386,8 +386,7 @@ findvar(p) if (!v) { warnx("%s: keyword not found", p); eval = 1; - } - if (hp) + } else if (hp) v->header = hp; return (v); } |