Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp908320rwb; Thu, 18 Aug 2022 14:39:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR7mIx4MehNDF/vzOhjcNEKEuVl2yf7Jd0PD4tpBYhgL1NZxA9ePRCFKzXV1URMk8iAss6Yj X-Received: by 2002:a17:907:763c:b0:730:c378:b860 with SMTP id jy28-20020a170907763c00b00730c378b860mr2823451ejc.97.1660858798760; Thu, 18 Aug 2022 14:39:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660858798; cv=none; d=google.com; s=arc-20160816; b=CXEOGjX1kozg9/CxOPvbkJ2wDeu1AJH7YOTQO9hLh7XHQv6CPBx7pX9x+M44DR+Ns7 H3MVtBdAUsnnOzSyBFptogz3gNX/jPcsDuxtHnyH79+gq1dJRgZRgDRpU+rUYR/GmK7P Ru+ym7bNfcFtdLoUeTIt+r6577VLyvFSBamsJHtVEu0+YFd7V3pxh+3AOCaRSDZizzMH dxZVIwhzkN2gLJnpyep1Fu8fJF0sSgghxCZmEJug7gA/mkoH0l/h/pT7RjX1JnTxUAYB lVgtHtU39jYSDuPAUJmwua9Y2ismuUP1rZJu52uMkLrUusxPtYECtEJyvRdT7uiXiRcy e1/g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qJUipbDPBgmNDT1MBSXnknuFOozz0FmfC62eLb/Ou/g=; b=xBMGQNpQsIz7BrpXHKySifbRYKxK9V+pouP8+5SPjYl+2A6ayKDckcLa2iGVEW8KXi X8dfprzAFzX6gf0fYjWzMtQTIWK8R8eBOfPW9cFtdxlv5K+aW89FioKLUso51kFKHiUh xq4e2T3/RoxLnUG9rPU7wbxfCGZan0+AQjA4kl4rL1Rc6NHtjnDx1fVK5CDd/SRWwtsd rIbT4k31GITiuktENSuV0DXrWUFQaONlFV+JOsdIFbFGxMxwkoNn2kx2I6ZCf5GAAA6C +5h66PDrmmfe5Z/tIudr2W7ZSsjez3yyDpwEyi0LUqau9mjS6fayZv7BilEeXmEjMEbQ iZxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=jdR1k3PE; 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 d23-20020a50fe97000000b0043d0a1ec60bsi1596226edt.393.2022.08.18.14.39.33; Thu, 18 Aug 2022 14:39:58 -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=jdR1k3PE; 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 S1346901AbiHRVOH (ORCPT + 99 others); Thu, 18 Aug 2022 17:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346503AbiHRVKH (ORCPT ); Thu, 18 Aug 2022 17:10:07 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7D33D7CC7 for ; Thu, 18 Aug 2022 14:04:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=KC1HZoPhJtlqDU UTWW+aiHPOzwFkXoEc81nhUB0Z74M=; b=jdR1k3PE5INssZuPH4/acL1j6ZIF94 VIjO1ZzBRH89T8ZxDZebPxu+fWPxpMnC9W58mL+WYCwligJFtV52RkgLKyOql8iB v/YAvNkVtWLN3z3GWm6XkTQNhIAtNM8TjVtfVhDvxbHqE04FNCRN1LQ+M50rb+co YrtLzdVzA8Hhs= Received: (qmail 3962202 invoked from network); 18 Aug 2022 23:01:37 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:01:37 +0200 X-UD-Smtp-Session: l3s3148p1@BymMSYrmI6sucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , David Sterba , linux-fsdevel@vger.kernel.org Subject: [PATCH 13/14] affs: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:01:22 +0200 Message-Id: <20220818210123.7637-13-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220818210123.7637-1-wsa+renesas@sang-engineering.com> References: <20220818210123.7637-1-wsa+renesas@sang-engineering.com> 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