From 6cd5fcd54b701fa5699b918a862ba94fe376acfa Mon Sep 17 00:00:00 2001 From: steve Date: Mon, 11 Aug 1997 02:29:50 +0000 Subject: Fix seg fault when invalid keywords are used. PR: bin/4253 Submitted by: Jesse Rosenstock --- bin/ps/keyword.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'bin/ps') 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); } -- cgit v1.1