From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 374A4385481C; Mon, 23 Nov 2020 15:23:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 374A4385481C Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: pty: Fix a bug in the code removing "CSI > Pm m". X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano via Cygwin-patches X-Git-Refname: refs/heads/master X-Git-Oldrev: fccb9d7239649d66665a92a556c6ab2b065d5f64 X-Git-Newrev: 65ee05d326ddbbc5cb60668bc5b9d631fa72ede8 Message-Id: <20201123152351.374A4385481C@sourceware.org> Date: Mon, 23 Nov 2020 15:23:51 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2020 15:23:51 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=65ee05d326ddbbc5cb60668bc5b9d631fa72ede8 commit 65ee05d326ddbbc5cb60668bc5b9d631fa72ede8 Author: Takashi Yano via Cygwin-patches Date: Mon Nov 23 20:03:02 2020 +0900 Cygwin: pty: Fix a bug in the code removing "CSI > Pm m". - The code added by 8121b606e843c001d5ca5213d24099e04ebc62ca has a bug which fails to remove multiple "CSI > Pm m" sequences. This patch fixes the bug. Diff: --- winsup/cygwin/fhandler_tty.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 600de085c..911945675 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -2063,6 +2063,7 @@ fhandler_pty_master::pty_master_fwd_thread () memmove (&outbuf[start_at], &outbuf[i+1], rlen-i-1); rlen = wlen = start_at + rlen - i - 1; state = 0; + i = start_at - 1; continue; } else