Received: by 10.223.176.5 with SMTP id f5csp1262145wra; Fri, 9 Feb 2018 16:00:01 -0800 (PST) X-Google-Smtp-Source: AH8x224oK1b0j/xuOHFR2rIApRyzTv+e5Y6kkyrFJooEbwyQtsPylO9ccj/palHKSZpD70xaUjEE X-Received: by 2002:a17:902:5a8c:: with SMTP id r12-v6mr3950374pli.87.1518220801826; Fri, 09 Feb 2018 16:00:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518220801; cv=none; d=google.com; s=arc-20160816; b=0JyeiNQ61zdDONhO4qP0zIRX24aB7ZYEQGXKOMjgr6Up+o8kHsWhDD+PE22erzbLOz 5VaJ4AJ285bVDg8ezl4wyCmrpE0bc7wpGqc50PaOi+WXLV1lnkMEY+IZDdICTEcWUCYY HqHQ4nxbY647fBZGpreC+UxHrErSOrKcjHh8RirFg8YWwKaZ0bcCWxNSTOFjfuWwwh9N NpDX0jMdccjmDBA35ymWV3E3bqqf4UhX+aFPAO1IjJvaUdp+Jhl+mYGis7JczSfuIp1h PrmUwrbur9U85vJ9ejckHCEqoe3lThn8TCAadGaX0ZGcIS6kTkp6FGzCZiOqSzkixVTE hVuA== 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:arc-authentication-results; bh=68KhApB4kF3DOuYMAdeZrKN8YB/UbrLF9OrsB5N7DKQ=; b=TiAs4ddFg4BYnDLThvXPYAAB75Nfa8LgVYZfJDmz4ftTrnl2VUOOLGtF/ixKl2s1bf k/MPkyziei9274wtjpdmacpv8wZ/Z12YxK8MOFolSMhy8TvSaTsUB7NzmOiTXHAGWZBU CCZRdIvpMi4HOxpEwmTuTy3Lk9vCCopQXNAhoVP8V9gV46its904gIRpWvgC6/cFppsL SykUmbMatN5YCFeTzp+8tDe0E/g8hYgKUdD/+T+O9rsgmOEg1qhTEL3V7NGkb1sUoyv7 xv7X71KmNxFxqgAGlSfp81xPbNMaVSfltFqZCWU5Twuw10UtG2CNu4jMahRzHOd1Sfzk BeCg== ARC-Authentication-Results: i=1; mx.google.com; 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 b13-v6si2183335pls.222.2018.02.09.15.59.48; Fri, 09 Feb 2018 16:00:01 -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; 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 S1753419AbeBIX6t (ORCPT + 99 others); Fri, 9 Feb 2018 18:58:49 -0500 Received: from mxf98a.netcup.net ([46.38.249.138]:41240 "EHLO mxf98a.netcup.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753355AbeBIX6n (ORCPT ); Fri, 9 Feb 2018 18:58:43 -0500 Received: from buildbert.robertabel.eu (x4d077b85.dyn.telefonica.de [77.7.123.133]) by mxf98a.netcup.net (Postfix) with ESMTPSA id 92BC71409B7; Sat, 10 Feb 2018 00:50:39 +0100 (CET) Authentication-Results: mxf98a; spf=pass (sender IP is 77.7.123.133) smtp.mailfrom=rabel@robertabel.eu smtp.helo=buildbert.robertabel.eu Received-SPF: pass (mxf98a: connection is authenticated) From: Robert Abel To: miguel.ojeda.sandonis@gmail.com Cc: linux-kernel@vger.kernel.org, Robert Abel Subject: [PATCH 1/3] auxdisplay: charlcd: fix hex literal ranges for graphics command Date: Sat, 10 Feb 2018 00:50:10 +0100 Message-Id: <20180209235012.4993-2-rabel@robertabel.eu> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180209235012.4993-1-rabel@robertabel.eu> References: <20180209235012.4993-1-rabel@robertabel.eu> X-PPP-Message-ID: <20180209235039.28608.58738@mxf98a.netcup.net> X-PPP-Vhost: robertabel.eu Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The graphics command expects 16 hexadecimal literals, but would allow characters in range [0-9a-zA-Z] instead of [0-9a-fA-F]. Signed-off-by: Robert Abel --- drivers/auxdisplay/charlcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c index 642afd88870b..324d02f9f1c5 100644 --- a/drivers/auxdisplay/charlcd.c +++ b/drivers/auxdisplay/charlcd.c @@ -441,9 +441,9 @@ static inline int handle_lcd_special_code(struct charlcd *lcd) shift ^= 4; if (*esc >= '0' && *esc <= '9') { value |= (*esc - '0') << shift; - } else if (*esc >= 'A' && *esc <= 'Z') { + } else if (*esc >= 'A' && *esc <= 'F') { value |= (*esc - 'A' + 10) << shift; - } else if (*esc >= 'a' && *esc <= 'z') { + } else if (*esc >= 'a' && *esc <= 'f') { value |= (*esc - 'a' + 10) << shift; } else { esc++; -- 2.11.0