Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp870725iol; Thu, 9 Jun 2022 16:18:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzcM0ypx64im6b39hVc48PPyVltDnm6MJYlXCAuB8RAqnTu0gB3oqp+C9YTGAD/urwwzNW0 X-Received: by 2002:a17:90a:c7cf:b0:1e8:2b77:7835 with SMTP id gf15-20020a17090ac7cf00b001e82b777835mr5779887pjb.109.1654816734734; Thu, 09 Jun 2022 16:18:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654816734; cv=none; d=google.com; s=arc-20160816; b=ThXpAkz8CDW9iUSFwsxMmMsPyR3lzLNffwzHVTn6wToiN/Bd5AH5dS3xTXSolrp6N5 /U2OY3zTC2lHvvgIPb9HtwTUerEl0xXr7xMsV5eHVBM7IpHQJNzj3Rz9FUXKaDXmVFAs wGkvlCuPfcrCXExMkGeIjmvqdESO7y3M/rySemYGdqDPZsiz0k8YbSO4fR9DLndAtUD/ S/Wlpm8HTUxAJOyJ8FUO7PQLxOSChsbCJHyRjmXlR4TVXV/a4KREnKMlwC4CXOhJynfR RcUj2tc68iTJf90Nux9UcgNIVGL2M2V7H8awkGDEuUP9SiVlGhbTVAeHK7PR8bGhXUUv K7OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=dB/VRnBqrla/uo3hQxagOMwn8rw3rKKNrg8KvvIMmrs=; b=xuxLg4e9Aib1rTuTSbokK4f05Nq2hNkXqfiXGZVbS6WTTmki7ef62lqa08LGP1s8gE s9ar5XVfC5N8LkJrb1c6TGSJEK42Gi1lO7gUahazpY6upDRmoVXZYkmFpctsM5w9Okoi wv4/60R5c8IbjbsiCFfadQkirSp6VopyuKjR6jzTA7iNdyHom+fIF1+ej8AHpaxT0DLL P7MAjkrnjEnSbl+rEPnSUxHhHhrUJLxSEuwTgI0mdtIVArNRQZNA8VfDF1xwr3TxRaO/ bguhD/Ilb6bHM3NXOj6ZnHSDWpfhTTXz8GdzmhQFXfT+R9H9wlI9SHxu0O+x9ZtT9pRq RHew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=NA8rGIzS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u62-20020a638541000000b004019c5f7652si2886621pgd.640.2022.06.09.16.18.41; Thu, 09 Jun 2022 16:18:54 -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=@google.com header.s=20210112 header.b=NA8rGIzS; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235397AbiFIWUt (ORCPT + 99 others); Thu, 9 Jun 2022 18:20:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345711AbiFIWU0 (ORCPT ); Thu, 9 Jun 2022 18:20:26 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B49414D6B1 for ; Thu, 9 Jun 2022 15:20:18 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id mh12-20020a17090b4acc00b001e32eb45751so324780pjb.9 for ; Thu, 09 Jun 2022 15:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=dB/VRnBqrla/uo3hQxagOMwn8rw3rKKNrg8KvvIMmrs=; b=NA8rGIzS2Lo/FSyJFJSopJzo3vj2qG+W/JBu2Td+wh8lNm3aGHNFbCPALJTDiKY3VZ BXYoT+Ww8rgiNjDcWDo8JWEIvIa789ch4uJ/akkx61GHrCbS4UYTLU+WBzXi0U6zqFg6 WETSd0zF9UD0yrUhECgMgO4+3B7vaNDE5q4OxsAILit4vZz26MEF5lP7eGpObNUfQYZP qWyriCnElNMS5dBnlp4ECfJw4cwUWsda0JPVGIsCkMRh996FjTM9tl6X5Bjcl49Ex3bX 056kN/4A+KMGFsvjat6Zhxnibo6NVJe0KQfbbqHffKzcdpAaOGAQ/5H1gcLRSIgsdnQd eZOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=dB/VRnBqrla/uo3hQxagOMwn8rw3rKKNrg8KvvIMmrs=; b=cjkyT1FcShoJpZriWxnDwjsF6rZcTaSQcqdUYeh48MsEW2nXM4ZX3xY85yZz3GNYip Z8sP4Zho+fD2Xv4m9yjbI5LeBnpP9z5W5XiX+JMxIxeVpB0p32Trk5S0bcCx5CbSuQjf MN0RJ0aFaepvjekJpWQEKZV3d+XDavbBrwIp3Ntbq/FIfYpmERJBa/xnds6xeZ/vUwZv Iwrvp0IZtw8o/9Zzz8AngFs7xIqfZq6G6Aa/sPxUF+Et24VivmTQipqcxiMIEWNFmjCF vX3R1uxlCJz11Q2G1D6HxvlG+PlOuxqovREq5fUS1rYtUXnu5m0rhGFD28hutPzhp2m3 PI5g== X-Gm-Message-State: AOAM532/oOantX8LPDr3Py92aeD++x6nKqICAFZUbEZP/RtrR1RukDVI dFGlHsy2mgEinJcEsGYZ1u41hd8y X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a62:e919:0:b0:51e:7b6e:5a3b with SMTP id j25-20020a62e919000000b0051e7b6e5a3bmr1529888pfh.78.1654813218119; Thu, 09 Jun 2022 15:20:18 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:27 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-9-morbo@google.com> Mime-Version: 1.0 References: <20220609221702.347522-1-morbo@google.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [PATCH 08/12] cdrom: use correct format characters From: Bill Wendling To: isanbard@gmail.com Cc: Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Phillip Potter , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Jan Kara , Andrew Morton , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jaroslav Kysela , Takashi Iwai , Nathan Chancellor , Nick Desaulniers , Tom Rix , Ross Philipson , Daniel Kiper , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, alsa-devel@alsa-project.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: drivers/cdrom/cdrom.c:3454:48: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] ret = scnprintf(info + *pos, max_size - *pos, header); ^~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- drivers/cdrom/cdrom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index 416f723a2dbb..52b40120c76e 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -3451,7 +3451,7 @@ static int cdrom_print_info(const char *header, int val, char *info, struct cdrom_device_info *cdi; int ret; - ret = scnprintf(info + *pos, max_size - *pos, header); + ret = scnprintf(info + *pos, max_size - *pos, "%s", header); if (!ret) return 1; -- 2.36.1.255.ge46751e96f-goog