From 76604a3fead686a57d50da5d07aeb2d481c308f8 Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 27 May 1999 16:52:49 +0000 Subject: Handle unterminated quoted strings without dup'ing the last character with an out-by-one-memcpy. --- usr.sbin/ppp/ppp/defs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/ppp/ppp/defs.c b/usr.sbin/ppp/ppp/defs.c index 9dbd5069edf..835d20c9e9e 100644 --- a/usr.sbin/ppp/ppp/defs.c +++ b/usr.sbin/ppp/ppp/defs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: defs.c,v 1.5 1999/05/08 11:06:35 brian Exp $ + * $Id: defs.c,v 1.6 1999/05/27 16:52:48 brian Exp $ */ @@ -268,7 +268,7 @@ findblank(char *p, int instring) if (instring) { while (*p) { if (*p == '\\') { - memmove(p, p + 1, strlen(p + 1)); + memmove(p, p + 1, strlen(p)); if (!*p) break; } else if (*p == '"') @@ -301,7 +301,7 @@ MakeArgs(char *script, char **pvect, int maxargs) instring = 1; script++; if (*script == '\0') - break; /* Shouldn't return here. Need to null + break; /* Shouldn't return here. Need to NULL * terminate below */ } else instring = 0; -- cgit v1.2.3