From e27525d9f827120ad0089cf2ff6518edead75e58 Mon Sep 17 00:00:00 2001 From: Steve Price Date: Mon, 11 Aug 1997 02:29:50 +0000 Subject: [PATCH] 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(-) diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index bd045e66b855..78bab6882ac3 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); }