From f3be888fd650ce5f6704917e55da224a43b3da96 Mon Sep 17 00:00:00 2001 From: markus Date: Wed, 22 Mar 2000 15:38:23 +0000 Subject: [PATCH] fix overflows, ok aaron@ --- usr.bin/ftp/main.c | 7 ++++--- usr.bin/ul/ul.c | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.bin/ftp/main.c b/usr.bin/ftp/main.c index 859188ecb80..aecaaa69cf0 100644 --- a/usr.bin/ftp/main.c +++ b/usr.bin/ftp/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.44 1999/12/08 12:57:06 itojun Exp $ */ +/* $OpenBSD: main.c,v 1.45 2000/03/22 15:38:23 markus Exp $ */ /* $NetBSD: main.c,v 1.24 1997/08/18 10:20:26 lukem Exp $ */ /* @@ -73,7 +73,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.44 1999/12/08 12:57:06 itojun Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.45 2000/03/22 15:38:23 markus Exp $"; #endif #endif /* not lint */ @@ -450,7 +450,8 @@ cmdscanner(top) * XXX - bogus commands with a colon in * them will not elicit an error. */ - if (el_parse(el, margc, margv) != 0) + if (editing && + el_parse(el, margc, margv) != 0) #endif /* !SMALL */ fputs("?Invalid command.\n", ttyout); continue; diff --git a/usr.bin/ul/ul.c b/usr.bin/ul/ul.c index d3bced594d2..b6d7c461eb6 100644 --- a/usr.bin/ul/ul.c +++ b/usr.bin/ul/ul.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ul.c,v 1.4 1997/01/15 23:43:27 millert Exp $ */ +/* $OpenBSD: ul.c,v 1.5 2000/03/22 15:38:23 markus Exp $ */ /* $NetBSD: ul.c,v 1.3 1994/12/07 00:28:24 jtc Exp $ */ /* @@ -44,7 +44,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)ul.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: ul.c,v 1.4 1997/01/15 23:43:27 millert Exp $"; +static char rcsid[] = "$OpenBSD: ul.c,v 1.5 2000/03/22 15:38:23 markus Exp $"; #endif /* not lint */ #include @@ -157,7 +157,7 @@ filter(f) { register c; - while ((c = getc(f)) != EOF) switch(c) { + while ((c = getc(f)) != EOF && col < MAXBUF) switch(c) { case '\b': if (col > 0) -- 2.20.1