From 38c84eeda382b8ae6d309d32e15c9ea105c97fea Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 16 Jan 1998 16:26:22 +0000 Subject: [PATCH] test for the boundary condition in the previous trailing blank fix --- bin/sh/miscbltin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sh/miscbltin.c b/bin/sh/miscbltin.c index 9814236f488f..1372ec6ae18e 100644 --- a/bin/sh/miscbltin.c +++ b/bin/sh/miscbltin.c @@ -1,4 +1,4 @@ -/* $NetBSD: miscbltin.c,v 1.21 1998/01/15 19:39:11 christos Exp $ */ +/* $NetBSD: miscbltin.c,v 1.22 1998/01/16 16:26:22 christos Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)miscbltin.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: miscbltin.c,v 1.21 1998/01/15 19:39:11 christos Exp $"); +__RCSID("$NetBSD: miscbltin.c,v 1.22 1998/01/16 16:26:22 christos Exp $"); #endif #endif /* not lint */ @@ -155,7 +155,7 @@ readcmd(argc, argv) } STACKSTRNUL(p); /* Remove trailing blanks */ - while (strchr(ifs, *--p) != NULL) + while (stackblock() <= --p && strchr(ifs, *p) != NULL) *p = '\0'; setvar(*ap, stackblock(), 0); while (*++ap != NULL)