summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/chat.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-08-17 22:47:07 +0000
committerbrian <brian@FreeBSD.org>1997-08-17 22:47:07 +0000
commita88afd3bf2f617a599319a1b7a1bad571153580c (patch)
treefe0e2324ac5bdaa04973ed855fa39b7c4fde3261 /usr.sbin/ppp/chat.c
parentbea84654b4f0fd08ba466388daea84de61943587 (diff)
downloadFreeBSD-src-a88afd3bf2f617a599319a1b7a1bad571153580c.zip
FreeBSD-src-a88afd3bf2f617a599319a1b7a1bad571153580c.tar.gz
Fix possible buffer overrun while "expect"ing
something that's "nearly" what it wants.
Diffstat (limited to 'usr.sbin/ppp/chat.c')
-rw-r--r--usr.sbin/ppp/chat.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 5810441..65f377e 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -18,7 +18,7 @@
* Columbus, OH 43221
* (614)451-1883
*
- * $Id: chat.c,v 1.29 1997/07/14 01:41:24 brian Exp $
+ * $Id: chat.c,v 1.30 1997/08/17 20:38:43 brian Exp $
*
* TODO:
* o Support more UUCP compatible control sequences.
@@ -354,12 +354,13 @@ WaitforString(char *estr)
flush_log();
return(MATCH);
}
- } else {
+ } else
s = str;
- if (inp == inbuff+ IBSIZE) {
- bcopy(inp - 100, inbuff, 100);
- inp = inbuff + 100;
- }
+ if (inp == inbuff + IBSIZE) {
+ bcopy(inp - 100, inbuff, 100);
+ inp = inbuff + 100;
+ }
+ if (s == str) {
for (i = 0; i < numaborts; i++) { /* Look for Abort strings */
int len;
char *s1;
OpenPOWER on IntegriCloud