svn commit: r262288 - stable/9/usr.sbin/ppp

Christian Brueffer brueffer at FreeBSD.org
Fri Feb 21 09:26:52 UTC 2014


Author: brueffer
Date: Fri Feb 21 09:26:51 2014
New Revision: 262288
URL: http://svnweb.freebsd.org/changeset/base/262288

Log:
  MFC: r261900
  
  In chat_UpdateSet(), initialize the input buffer to prevent stale data
  from previous timed out commands.
  
  PR:		186530
  Submitted by:	Alexander Zagrebin <alexz at visp.ru>
  Reviewed by:	brian

Modified:
  stable/9/usr.sbin/ppp/chat.c
Directory Properties:
  stable/9/usr.sbin/ppp/   (props changed)

Modified: stable/9/usr.sbin/ppp/chat.c
==============================================================================
--- stable/9/usr.sbin/ppp/chat.c	Fri Feb 21 09:25:52 2014	(r262287)
+++ stable/9/usr.sbin/ppp/chat.c	Fri Feb 21 09:26:51 2014	(r262288)
@@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd
     else {
       /* c->state = CHAT_EXPECT; */
       c->argptr = &arg_term;
+      /*
+	We have to clear the input buffer, because it contains output
+	from the previous (timed out) command.
+      */
+      c->bufstart = c->bufend;
     }
     c->TimedOut = 0;
   }


More information about the svn-src-stable-9 mailing list