Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp898678rwb; Thu, 18 Aug 2022 14:26:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR6NhUkWmJ33SmcqPsEiTLR/VbF6xvtR792zuVFfTibhltXSYgLeVshMdYtVRthH2ng7TX6i X-Received: by 2002:a05:6402:5190:b0:43d:da02:566a with SMTP id q16-20020a056402519000b0043dda02566amr3627692edd.187.1660858003372; Thu, 18 Aug 2022 14:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660858003; cv=none; d=google.com; s=arc-20160816; b=ETUpIEKZrCkFn2aSCtB25J/g9TJG2rZ04NeNV0susucAeFWpoSTyIiULEHQeedmtoD m/wTODBGzFYSYrNdirZqvA4hFWhrZ+bLjhWXgy9dJG1HbC+pCK3OCtgioBvgK2IdOb1M 9narXzCGjLKMbTLxtfclFSwKDji3IHgDAat5lq65Gq/T/1lM6KUZw2G7sAyvk4HO5lFb 0gp3272JNZvpZT2o8qzjE9kMAlhvSUyTarJx/s1rqOv8uGEdkfDnoIzuhZ7Sq9bqPJja JtT0QoX155mpFq5cs+UL9VT2++L2lyBkBpiZPYQYBxMk3dCbbcBsW2eb8sWsFPIpXzBt 4a2A== 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=1aH7/e3ZXYn3Oh9VXRJ7Mw/YlWN+XZdGJy7Z9qXYOuk=; b=YcFUvyiqQtUHxnmZYKnUWsg+DL2OCk3oclglKFzPT//7+cOp51L4pLROmfkKCcTAEh RoMyV4uAYhA/YhK9e8TEN4mpesJ9J1FD2QaQnxeZsveMqBbqVwsNplMnL2WZ7KCUQQ9A dKdoF108idedkWvs9fMopib+3HN+f3U10bIpCUaCMgg0HOxG3n0sdtC/u4wa6jSeBkxO WsN5gHEy6pcTyOP39ix/vAqnNEwf0wdcHcnbuCkz515U1hJF1tIr7O+Ib+tRQ40tU/wv iRGGOqIb9qRJLyT5V53H/ZLTHi/FbWNEsCNpOAoaekRoomWtu7tMZ3QUB79Y79aO3JTU 9HeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=to2GQpI2; 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 r15-20020a05640251cf00b0043d604a5bf7si1832226edd.93.2022.08.18.14.26.17; Thu, 18 Aug 2022 14:26:43 -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=to2GQpI2; 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 S1346593AbiHRVJi (ORCPT + 99 others); Thu, 18 Aug 2022 17:09:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346619AbiHRVJB (ORCPT ); Thu, 18 Aug 2022 17:09:01 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5549DB043 for ; Thu, 18 Aug 2022 14:04:15 -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=N6BywkBKgygX/iq/S3KMnIP0Yhx fcMiSe4kDyKM/6zk=; b=to2GQpI27KvyBrjSMEvnYI3cxOjZ1WWue2ZyZksxp4s lUkKjWC/aM1Kg7WiT0waKuEpuOXifoJ264hsfgqRj0+pm2JZWjvLQMPOCLxbujpD SdVNc8ZwqiIAPy+BJ5VMst/6PK/t5ElnbHlmiUfTmPjQhLHgeTNxnGTaVubCSENg = Received: (qmail 3961877 invoked from network); 18 Aug 2022 23:01:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 18 Aug 2022 23:01:24 +0200 X-UD-Smtp-Session: l3s3148p1@YcPASIrm+swucref From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Hans de Goede , linux-fsdevel@vger.kernel.org Subject: [PATCH 01/14] vboxsf: move from strlcpy with unused retval to strscpy Date: Thu, 18 Aug 2022 23:01:10 +0200 Message-Id: <20220818210123.7637-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/vboxsf/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/vboxsf/super.c b/fs/vboxsf/super.c index d2f6df69f611..1fb8f4df60cb 100644 --- a/fs/vboxsf/super.c +++ b/fs/vboxsf/super.c @@ -176,7 +176,7 @@ static int vboxsf_fill_super(struct super_block *sb, struct fs_context *fc) } folder_name->size = size; folder_name->length = size - 1; - strlcpy(folder_name->string.utf8, fc->source, size); + strscpy(folder_name->string.utf8, fc->source, size); err = vboxsf_map_folder(folder_name, &sbi->root); kfree(folder_name); if (err) { -- 2.35.1