From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 86313 invoked by alias); 19 Dec 2019 11:29:12 -0000 Mailing-List: contact cygwin-cvs-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cygwin-cvs-owner@cygwin.com Received: (qmail 86293 invoked by uid 9078); 19 Dec 2019 11:29:12 -0000 Date: Thu, 19 Dec 2019 11:29:00 -0000 Message-ID: <20191219112912.86291.qmail@sourceware.org> 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 ESC[?3h and ESC[?3l handling again. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/master X-Git-Oldrev: 76dcfd0c4d31ef2658564ba2fac8b1852704c45a X-Git-Newrev: 27202a1b143d19ceadfac2584f208392e4e0859a X-SW-Source: 2019-q4/txt/msg00044.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=27202a1b143d19ceadfac2584f208392e4e0859a commit 27202a1b143d19ceadfac2584f208392e4e0859a Author: Takashi Yano Date: Thu Dec 19 20:03:30 2019 +0900 Cygwin: pty: Fix ESC[?3h and ESC[?3l handling again. - Even with commit fe512b2b12a2cea8393d14f038dc3914b1bf3f60, pty still has a problem in ESC[?3h and ESC[?3l handling if invalid sequence such as ESC[?$ is sent. This patch fixes the issue. Diff: --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 8c3a6e7..f10f0fc 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1263,7 +1263,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) { p0 += 3; bool exist_arg_3 = false; - while (p0 < buf + nlen && !isalpha (*p0)) + while (p0 < buf + nlen && (isdigit (*p0) || *p0 == ';')) { int arg = 0; while (p0 < buf + nlen && isdigit (*p0))