Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp912178rwb; Thu, 18 Aug 2022 14:46:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR4PoSNwDugVOgzMdpMJt7BSwafUqqrz6R9/E6XXZGgjyo5dFEGS4jApD236+xmUKmzPhMq2 X-Received: by 2002:a17:90b:4d0f:b0:1f7:ae99:b39d with SMTP id mw15-20020a17090b4d0f00b001f7ae99b39dmr5002122pjb.237.1660859175524; Thu, 18 Aug 2022 14:46:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660859175; cv=none; d=google.com; s=arc-20160816; b=UoihI2RPRzlKMu3sREr2/9SWQ/gpDz4ATptZr4zlkffOXOYvzpOBy5PPSl2CMs8+XU ZQo6IKv0Eq0YfQVg0pwrv0hYM08PO+FkEKWiahwLnPszi90+NWRLZWCzNC7MvmTg9fk3 JViwLWoN69/yuWOiJqS47D8bJR08/MLCfmFrsuhUguKqc+PcMWOBSgc5HDJuXSRRHB++ OuQ8s0QiW2DzQWrsjfcBjrLmcSWNqi+iqxxQE2ur4qte/Bfal03V9zaai7dT6jRe1pa3 /1M3/OyKbMRJAOlMdMNHqBlzduU/D1GJNaJ3DNOtR2+wp5pFceHtVmcynRU8BRk9UTav 1rlw== 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=qJUipbDPBgmNDT1MBSXnknuFOozz0FmfC62eLb/Ou/g=; b=kcCTZxG4suwYxcKE5MPxpjdXq+gTbDlx2D5Edy/1wpzijJxLTfbUwybPy9Hpq8e2TK MQg8gEu9tq0NNFEOjGg9sqpB41kEhvf1IoQDu86wCqi5jkYJyJKs5FuoeypZD/cmKa8M 34ZfOUd7BIcx8bvKWmduig1kz3xdxnChRUBD7I5quZZEfySvAya2PBYZk0w07Yh0J/zJ sihPjYJqdW6GaIaoCkuCdhTvQzuV/+IWb7t/UYvI7ZGWD6IMmApyQBUB4DfoH4HaPU+D 77bc3mBvisGUA56J/PMJ7flR4bSaRzeS/32rH+/p02ZYQ/WwFNUMksJnD7fcWbUZ4qRp GrEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=AoXUdYdo; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q33-20020a63f961000000b0041da9c3eda9si2180839pgk.412.2022.08.18.14.46.03; Thu, 18 Aug 2022 14:46:15 -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=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=AoXUdYdo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346670AbiHRVLX (ORCPT + 99 others); Thu, 18 Aug 2022 17:11:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346586AbiHRVKF (ORCPT ); Thu, 18 Aug 2022 17:10:05 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 799F1D3E51 for ; Thu, 18 Aug 2022 14:04:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=KC1HZoPhJtlqDUUTWW+aiHPOzwF kXoEc81nhUB0Z74M=; b=AoXUdYdojZjzq8zq47WkZ30t/V0a4VOO5GFDTz6krDn 3+GvqBUwjb+tqG0Z1XYhCpgmuW0lSRrMxPBpwlFYhTDqxJT69BCm7SJpJ5vBAMYH SXID3NGujex++LZV7K4W335y7f0DXGtCPlJ0obu+YHgaYzxa89ceZcD6XEE9GF8g = Received: (qmail 3962255 invoked from network); 18 Aug 2022 23:01:40 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:01:40 +0200 X-UD-Smtp-Session: l3s3148p1@EaauSYrmM4Yucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , David Sterba , linux-fsdevel@vger.kernel.org Subject: [PATCH] affs: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:01:39 +0200 Message-Id: <20220818210139.7819-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=no 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 Follow the advice of the below link and prefer 'strscpy' in this subsystem. Conversion is 1:1 because the return value is not used. Generated by a coccinelle script. Link: https://lore.kernel.org/r/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/ Signed-off-by: Wolfram Sang --- fs/affs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/affs/super.c b/fs/affs/super.c index 4c5f30a83336..58b391446ae1 100644 --- a/fs/affs/super.c +++ b/fs/affs/super.c @@ -276,7 +276,7 @@ parse_options(char *options, kuid_t *uid, kgid_t *gid, int *mode, int *reserved, char *vol = match_strdup(&args[0]); if (!vol) return 0; - strlcpy(volume, vol, 32); + strscpy(volume, vol, 32); kfree(vol); break; } -- 2.35.1