From owner-svn-src-all@FreeBSD.ORG Fri Feb 21 09:25:52 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE0B620F; Fri, 21 Feb 2014 09:25:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D961315B3; Fri, 21 Feb 2014 09:25:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1L9PquU057163; Fri, 21 Feb 2014 09:25:52 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1L9PqvT057162; Fri, 21 Feb 2014 09:25:52 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402210925.s1L9PqvT057162@svn.freebsd.org> From: Christian Brueffer Date: Fri, 21 Feb 2014 09:25:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r262287 - stable/10/usr.sbin/ppp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 09:25:53 -0000 Author: brueffer Date: Fri Feb 21 09:25:52 2014 New Revision: 262287 URL: http://svnweb.freebsd.org/changeset/base/262287 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 Reviewed by: brian Modified: stable/10/usr.sbin/ppp/chat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ppp/chat.c ============================================================================== --- stable/10/usr.sbin/ppp/chat.c Fri Feb 21 09:22:37 2014 (r262286) +++ stable/10/usr.sbin/ppp/chat.c Fri Feb 21 09:25:52 2014 (r262287) @@ -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; }