Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp755051imu; Sat, 15 Dec 2018 06:41:57 -0800 (PST) X-Google-Smtp-Source: AFSGD/XtaoVybbk3j/0+sP+FDjBz4MAtGXFoRZSsZtej/XR1awtjfhNiC24XsFyD9I89UztlLJEn X-Received: by 2002:a62:3305:: with SMTP id z5mr6798927pfz.112.1544884917837; Sat, 15 Dec 2018 06:41:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544884917; cv=none; d=google.com; s=arc-20160816; b=ZVeUSAf2PrCigcbrlN0iLOlHJtISInQUbuEfv5VdpJiv/v1VALthLq1/53sGjfqwsj aJrxCF8WVANraZSmVWqdNAirPcY6LwOtwcr5F1PUu8+SuBLxexyEXCkHr47nYuwD+Y5J pv8qspbOL0gWhlv0ultQ/zDZF6/Whf6eBPCpPCvALiJRcXRtl285RgPytUMYwHGaxGym ny5QCB31wnYpzJkIJEvb6WccICRLi7JsgRMNT3pvlZCIArBrTDsaCivmqzNuljgZMiDh 4rTDmJoaWWxa29QAbXRNq8T6btPrpk9K6FXAPLjeOZabWQQXpDRjN3Po9yGiWbus2Ob2 OXhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=bMWteMbo9YxKymcrXTfY1Y4vqSHG6AEUyQ7yUNxIl2g=; b=DiizoaB9f7SbS4S4vXB3YVZ3zuxacRzwiw96GZzc0ekuoWtcHzneKjFKQwLU+fKW8R a5AEW/wTPZ9RI/lOVig55PIgPfzzFa0zlemnz4WgWhMR5Ecq4mp3SefEkvWFWVleS7x/ ZtKSX3uhSwoWcITeMbOPS4ypjwb7LdO/yQogXQrDmTKiNOqYVdbXfkrEgG3QWkb4HMbH ANyfrKsdGsDNmTqIyqDe38ZrVHcAMyo2EAJM2YPlw0q9UaxgZkft3z6GQbFXR8y7t/ay lBF+L+z3N4ZzH4jdZH996EjPrnxWKEaxgZgioGgDHtxWPkZo2mbdn1kRCiVMhOcEd/FX 55lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@uchuujin.de header.s=h header.b=SxCmz2PE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si6576528plg.29.2018.12.15.06.41.42; Sat, 15 Dec 2018 06:41:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@uchuujin.de header.s=h header.b=SxCmz2PE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730448AbeLOOkw (ORCPT + 99 others); Sat, 15 Dec 2018 09:40:52 -0500 Received: from static.85-10-192-230.clients.your-server.de ([85.10.192.230]:40497 "EHLO mxout.uchuujin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730127AbeLOOkv (ORCPT ); Sat, 15 Dec 2018 09:40:51 -0500 Received: by neutronstar.dyndns.org (Postfix, from userid 1000) id 8A99C1430BAF6; Sat, 15 Dec 2018 15:35:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uchuujin.de; s=h; t=1544884535; bh=kO+8JQKEHghETcTGMp8B7N1A9HZLjDbi6GLuJYNtF/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SxCmz2PEcby3uXgmsInM7n2/9BnKJh+qvljUZ9INEuOyye5LQzReAb1AAmgOq5uiC VIrpo7UYWudx3Ns7KSaa5ylS6ztTj1y2owS5lw6DUu56AmNr1Jy0MovGorV+RVqGyF FpBRzyoJBYbobOgnVDK7ES9IwnGaucRSsrEk7PU9++MFRLWvehc0vj8xg30OpEc1dL O26HM4otmrxOKByuln0x6z2nh8TG1fERfleY6CAQg5ImrNcmXsJEx1JGPKhJmc9wF8 /m0X4KYbE1wSTfUZlSFci3Gpbm5/0/RnsvEnaJC6km4XgLQH2pvkTF0din+TX1cnS0 jN9CGTSfF05qQ== From: Martin Hostettler To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Nicolas Pitre , Adam Borowski , Egmont Koblinger , Martin Hostettler Subject: [PATCH 4/4] vt: ignore sequences that contain ':' in parameters. Date: Sat, 15 Dec 2018 15:34:23 +0100 Message-Id: <20181215143423.4556-5-textshell@uchuujin.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20181215143423.4556-1-textshell@uchuujin.de> References: <20181215143423.4556-1-textshell@uchuujin.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org csi sequences can contain subparameters delimited by ':' characters. For now just ignore the whole sequence in this case. Such sequences are used by more capable terminal implementations with T.416 high color modes or extended underline rendition attributes. Also ignore sequences with private use characters '?', '>', '=' and '>' that are not at the initial position. Signed-off-by: Martin Hostettler --- drivers/tty/vt/vt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 24cd0e9c037b..0aaa15c723fa 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -1629,9 +1629,9 @@ static void rgb_background(struct vc_data *vc, const struct rgb *c) /* * ITU T.416 Higher colour modes. They break the usual properties of SGR codes - * and thus need to be detected and ignored by hand. Strictly speaking, that - * standard also wants : rather than ; as separators, contrary to ECMA-48, but - * no one produces such codes and almost no one accepts them. + * and thus need to be detected and ignored by hand. That standard also + * wants : rather than ; as separators but sequences containing : are currently + * completely ignored by the parser. * * Subcommands 3 (CMY) and 4 (CMYK) are so insane there's no point in * supporting them. @@ -2259,7 +2259,7 @@ static void do_con_trol(struct tty_struct *tty, struct vc_data *vc, int c) vc->vc_par[vc->vc_npar] += c - '0'; return; } - if (c >= 0x20 && c <= 0x2f) { + if (c >= 0x20 && c <= 0x3f) { /* 0x2x, 0x3a and 0x3c - 0x3f */ vc->vc_state = EScsiignore; return; } -- 2.11.0