Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2958443rwl; Mon, 27 Mar 2023 07:31:22 -0700 (PDT) X-Google-Smtp-Source: AKy350a2TPPRpP6f3pWitdUkCNqHf7SKI0SIaTIkqvTAxe2rE4ookCXD9habJ2YPGw2++C++b/kZ X-Received: by 2002:a17:903:11ce:b0:19c:b11b:ffca with SMTP id q14-20020a17090311ce00b0019cb11bffcamr16574074plh.23.1679927482379; Mon, 27 Mar 2023 07:31:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679927482; cv=none; d=google.com; s=arc-20160816; b=TrgtSCNGxeMd9HyDZliLYwDNxZNLycrQYPIfqLadwH0paHBPThbD6NDQL5QR7JTBu7 64aauDcKE7ffL4SPIvMEk9JkZ2EpwOa/n7xNiOpEOku0sKDuVvyZn1VBBUUp3UJGb1PO C1FZMmfOGdxJ7sh17HLP6Az7GCqlujw+oiZJREVxL9CdehDeUA9ysrI7k/MIvizqL8wA hUrBYHVvUolX19mMe2eOyTV3sHuj4cOiNc0TtAlXBDUfadF6o6tomVlHsOYZoUybBtnB WzV1vy7vdxkGI3ANz56cVCjTTo3PNXe+fq1IjYhACyu+6WLisI+0iYyB8kpw7zN5Latn 6XTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=E3JWq4PQNKTO2zqEveFryAi9kgNDjjoqnr4zMGnpAFo=; b=nWJjcoy4CzHykE37UiKjnKZHsLM6SOGXXlJ3Hl3pwd7gKuZyRCw9p+HuwfPtSJtGaC xrQkjNAt7Zw7ptBdh7IB/Qb63OA+LZdhJl8zUy2tKhBnOzwD3dGl7DjSgXQ1Yz4o4fbD 2e0FVmlRd9tssGKlRRJiLyK0STNM1aoYyYTHn+TXYO+U3DWOjgK93GBUIPjjBq1qDNE8 lFcctJkr5w8yTpv0iDlgaiWAMaErjnfvPGBZwSN8rP4Ugr9R5sH5NBambo75ENm5FoMm B1WF+5NBCg5cl9DUTLR1TheiF21kGToKXAoQqvHbgxquATxuPHoJyCoIkyrUZ6za3BlP 2tig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YicTcMlL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a63f408000000b004e00a870567si27191718pgi.124.2023.03.27.07.30.52; Mon, 27 Mar 2023 07:31:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YicTcMlL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232850AbjC0O2f (ORCPT + 99 others); Mon, 27 Mar 2023 10:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232617AbjC0O2P (ORCPT ); Mon, 27 Mar 2023 10:28:15 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79710659B for ; Mon, 27 Mar 2023 07:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679927257; x=1711463257; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=bwHaYJuF6V1NJzur1wTeCyoLa0ib0Nh/wjM0jlUNCOo=; b=YicTcMlLw2rwrSH/GukA+0spntmptxHLG6jkf6wubgZBIyyIraomfCmX Z9dNeD8tctvlSelbEZSdIPKbM+ZoqOMus1qyvle+yqBBFFEJUX+pIYbWq f1fSY13fGx/8+3FVYk0wb6yQfpIfUu6NVv0lEV2A0MWl7fF4PyWZCvF0g yA/tfpYuDfF17EAmne8gvcsYsbLse9gqXMezRb3+iK8MZpI7fGA+pTBJN tMmwVhcsSIM0/7AejIKeMv3b3ubV5sxhlQqhxTK6Jij5xgUBqzC/Oh7iF ME+sc4g/R+lh3SA7gzrjQrjqzmeLpNF6PtITFZal9Bns9z18R2otiG8rG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="320676727" X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208";a="320676727" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 07:27:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="676981809" X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208";a="676981809" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 27 Mar 2023 07:27:34 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 6753479C; Mon, 27 Mar 2023 17:27:35 +0300 (EEST) From: Andy Shevchenko To: Petr Mladek , linux-kernel@vger.kernel.org Cc: Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes Subject: [PATCH v1 1/1] lib/vsprintf: Use isodigit() for the octal number check Date: Mon, 27 Mar 2023 17:27:21 +0300 Message-Id: <20230327142721.48378-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use isodigit() to test the octal number instead of homegrown approach. Signed-off-by: Andy Shevchenko --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index fbe320b5e89f..40f560959b16 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -3642,7 +3642,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args) if (!digit || (base == 16 && !isxdigit(digit)) || (base == 10 && !isdigit(digit)) - || (base == 8 && (!isdigit(digit) || digit > '7')) + || (base == 8 && !isodigit(digit)) || (base == 0 && !isdigit(digit))) break; -- 2.40.0.1.gaa8946217a0b