From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F5EE351C1A; Tue, 3 Mar 2026 18:19:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772561971; cv=none; b=TlmC21nuSW5ryR3Ayo6Mzu2G/2gAARcAZ1Gju92GLGdC78AObWXPN2lFFugob1D/DgRN8c758q4FiSljbdiqj0sMHrhlU6smcxe3lohvOaG9NSveO9RANU8KOwn61YLgLbZVGI93xqcbAJ7UqYv/MfK0zW9k7V/BPcp/KzQLSKA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772561971; c=relaxed/simple; bh=5dKzwHPU8WxvVkX8RO79g2GYM+s2RpbX2aOUa8oIdtw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f/YqznxtQIFbFOVbefu3IdliZnC+ej/RIgx/CJC/vbSuBQp3LKxmFlEKln/l6snmOmnpeemqxXveZkiU9tZdWTR1AAMl52xNOkgRuFGXJK3tzhfaQ9U8p8hajuCd1NM4bEDhH+LiypYUzng128xaPVIRCwsp73Gt89ZfO6qBGEM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lF3pcxME; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lF3pcxME" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11095C116C6; Tue, 3 Mar 2026 18:19:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772561970; bh=5dKzwHPU8WxvVkX8RO79g2GYM+s2RpbX2aOUa8oIdtw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lF3pcxME2RNHx52AjA+BEwwfFWe4cE15ekxefQf3Q+N7FI6KZALQjS8XXQk00abMa kHNOfy/zgzvn256n0n9dxlGieAFVz3+U66/xXZWIww6tw5vx3DNwQLO53c1oOTc1uV dG3GkQx3RXYhDMp3sDFEuNekcbhw5vy3piV96CjWqmP9ZuCGW8kGwOLI05i774BakE Jbw9Lw0lPRnVgQqIadPnGdgngX13AChVj5fWUlCgDDobLpLBR7nTYDNcjqmYEWrcFi D07p2oO1NskOmXLaOBngFU1ZtH5tA/9udOh+FMbQdl+LZuy9/XiUXCDybsx71VWJ/3 6eOSH1dl0pHHA== Date: Tue, 3 Mar 2026 18:19:27 +0000 From: Simon Horman To: tomasz.unger@yahoo.pl Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1] NFC: nxp-nci: Replace strcpy() with strscpy() Message-ID: <20260303181927.GE71509@kernel.org> References: <20260301135633.214497-1-tomasz.unger.ref@yahoo.pl> <20260301135633.214497-1-tomasz.unger@yahoo.pl> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260301135633.214497-1-tomasz.unger@yahoo.pl> On Sun, Mar 01, 2026 at 02:56:33PM +0100, tomasz.unger@yahoo.pl wrote: > From: Tomasz Unger > > Replace strcpy() with strscpy() which limits the copy to the size of > the destination buffer. Since fw_info->name is an array, the > two-argument variant of strscpy() is used - the compiler deduces > the buffer size automatically. > > This is a defensive cleanup replacing the deprecated strcpy() > with the preferred strscpy(). > > Signed-off-by: Tomasz Unger > --- > Testing: > - checkpatch.pl: 0 errors, 0 warnings > - make M=drivers/nfc/nxp-nci/: compiled successfully, 0 errors, 0 warnings > - Module loaded successfully in QEMU (x86_64) with buildroot: > modprobe nxp-nci - no errors, confirmed via lsmod Reviewed-by: Simon Horman