summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrueffer <brueffer@FreeBSD.org>2014-02-21 09:25:52 +0000
committerbrueffer <brueffer@FreeBSD.org>2014-02-21 09:25:52 +0000
commit9f9257101a73a807f44a8b46452822dbab7305b0 (patch)
tree810af3dfa3d39fd80ed2c5af179ff62bacdf7b8c /usr.sbin/ppp
parentffebb434a5fd0fbb478c332a7a89aeeeba174336 (diff)
downloadFreeBSD-src-9f9257101a73a807f44a8b46452822dbab7305b0.zip
FreeBSD-src-9f9257101a73a807f44a8b46452822dbab7305b0.tar.gz
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
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/chat.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/ppp/chat.c b/usr.sbin/ppp/chat.c
index 04b2679..daa52cd 100644
--- a/usr.sbin/ppp/chat.c
+++ b/usr.sbin/ppp/chat.c
@@ -154,6 +154,11 @@ chat_UpdateSet(struct fdescriptor *d, fd_set *r, fd_set *w, fd_set *e, int *n)
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;
}
OpenPOWER on IntegriCloud