Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754003AbbL2UJT (ORCPT ); Tue, 29 Dec 2015 15:09:19 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33121 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753712AbbL2UJR (ORCPT ); Tue, 29 Dec 2015 15:09:17 -0500 From: Ksenija Stanojevic To: gregkh@linuxfoundation.org Cc: willy@meta-x.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Ksenija Stanojevic Subject: [PATCH 4/5] Staging: panel: Reduce value range for *name Date: Tue, 29 Dec 2015 21:09:07 +0100 Message-Id: <98e397c49797d27fc7494e213a6980946df785e7.1451418912.git.ksenija.stanojevic@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 950 Lines: 29 out is 0-9 so it's too much for om, therefore reduce value range for *name from '0'-'9' to '0'-'7'. Signed-off-by: Ksenija Stanojevic --- drivers/staging/panel/panel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index 6dc3efb..70cb9f3 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c @@ -2065,7 +2065,7 @@ static u8 input_name2mask(const char *name, __u64 *mask, __u64 *value, im |= BIT(in); name++; - if (isdigit(*name)) { + if (*name >= '0' && *name <= '7') { out = *name - '0'; om |= BIT(out); } else if (*name == '-') { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/