From nobody Mon Nov 25 05:31:52 2024 Received: from sonic306-21.consmr.mail.sg3.yahoo.com (sonic306-21.consmr.mail.sg3.yahoo.com [106.10.241.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 571EE2038D9 for ; Tue, 29 Oct 2024 23:37:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=106.10.241.141 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730245082; cv=none; b=MEMDf8ra7vbQGXsy325Tz4U2MNBfCWtTG36gs/T6eMcxPusP7ZTbblOtyAbpZzDjkEqtfYDmSm31XOPZUhBHY43Dh9qCgelfKtYLXqOKo/vRzSQ3XTSv2S6YMdhXO5XlUsLchCguOxHQJ/3l3rR8vX1Owo9sSiHGqoE2KJdSKdU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730245082; c=relaxed/simple; bh=w7HW4iNMeHO932LTBNDZgLJxyPb5FGS1JRxdU0k+BxA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:References; b=DGoIcPjkc8zGEsj3KxBxIiGrGcumChRHv6NR7vYyrMizA7OrmClcEKX6UkDRnUuXHQ2f3SFDRLyMLbnzvRCY2cZwXJAm/n9sAmMiOpjT3qIZnLSiW/EHHfw3yIGVnBjEHDeYb6QvFjXfJsLNAfyLiLjJKrsyuLaq4W3wJX00POU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=myyahoo.com; spf=pass smtp.mailfrom=myyahoo.com; dkim=pass (2048-bit key) header.d=myyahoo.com header.i=@myyahoo.com header.b=jGJSPyYT; arc=none smtp.client-ip=106.10.241.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=myyahoo.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=myyahoo.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=myyahoo.com header.i=@myyahoo.com header.b="jGJSPyYT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=myyahoo.com; s=s2048; t=1730245077; bh=CANO7+oMA8nkkb8BNVFqkHt5bjmgbHDSwStgzlrk0qQ=; h=From:To:Cc:Subject:Date:References:From:Subject:Reply-To; b=jGJSPyYTUaLmZoAZUzJjnAYlie23f3ofYzabUGzoNu5lJg2Ms7mRNgw8hwm4aQhDrWMUAe375XEeY/DEqsz9J088O4Q+eGPdO1GEhZIw8hYjPFOtyJgHMUHP5HGXiSfacx88sR3vykimLZdDdGOcdUpEGn1VrGsf+TPTMo5+Ds6yDu2v5ahBAi60S0jxXiLzQJalS2icT39UwnAERBRFMoMGSldz+wMQVhHaDhKbDS9lJtK2EkljRrSwPsJST3IGcXhsdRwKaawcnkJ9m+DfjaN8GK9OanvjpkbmuSdfRf0CcxSCIpn+WDLsrj73yEKi8kH2dz4Gc55R2C+lXkoNtg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1730245077; bh=gU/z13pLDmCV53hK8nPPHWISZl1bQUueogbZcFY3cad=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=PA0zHjFI2l/HQHiqruy8o+tZNeUn0azivbkdMMsJrxgovxhAxJ6ponaGFD68oimVtjBw2xdzDQj7kFrIIoyw5dHHoi9UV7oo8EajZfz0JEGNQw+fEd92MKn83R5S/LDF5LZC6PAWEAh6uZdg/Ka/sc3KygD0RrSO5kMWV0ol4qUcG16qLYo5ApBondD+7v/73p78vi8+Vh9Wpp//ZcvpvqmRg9vj0M0TYm1U6gzE1ol43TVzkm84CRkxs+OpJLyBb0dHIP/qoGvSuq3pF4Y4DKit3zyFsMzqkL+nJkdcvfdB2nkQ+BjDUGlSmWvHDrA2ftZS7PgxRwkQSyStKZxOTA== X-YMail-OSG: beuo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uzTtk BkMrjV.ToVR7bOCBUYeGmH_M4uOqMYdFtVcT35LqoaqIAc2ef6Nau9KyJuQC4C4NQI3QGOdpPwCG Lx_p7NHNlY.8OcUMXgrQAgnuYsL1oPe24i8aqY1k- X-Sonic-MF: X-Sonic-ID: 320644b0-bd48-41df-87f6-9d2cb6f7bc86 Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.sg3.yahoo.com with HTTP; Tue, 29 Oct 2024 23:37:57 +0000 Received: by hermes--production-sg3-5b7954b588-2czcw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 30c7e69c8517e1fdffb1648896dbbb2f; Tue, 29 Oct 2024 22:16:48 +0000 (UTC) From: Abdul Rahim To: krzk@kernel.org Cc: Abdul Rahim , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] nfc: s3fwrn5: Prefer strscpy() over strcpy() Date: Wed, 30 Oct 2024 03:46:34 +0530 Message-ID: <20241029221641.15726-1-abdul.rahim@myyahoo.com> X-Mailer: git-send-email 2.46.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable References: <20241029221641.15726-1-abdul.rahim.ref@myyahoo.com> Content-Type: text/plain; charset="utf-8" strcpy() performs no bounds checking on the destination buffer. This could result in linear overflows beyond the end of the buffer, leading to all kinds of misbehaviors [1] this fixes checkpatch warning: WARNING: Prefer strscpy over strcpy Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy= [1] Signed-off-by: Abdul Rahim Reviewed-by: Krzysztof Kozlowski --- drivers/nfc/s3fwrn5/firmware.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/s3fwrn5/firmware.c b/drivers/nfc/s3fwrn5/firmware.c index c20fdbac51c5..85fa84d93883 100644 --- a/drivers/nfc/s3fwrn5/firmware.c +++ b/drivers/nfc/s3fwrn5/firmware.c @@ -469,7 +469,7 @@ void s3fwrn5_fw_init(struct s3fwrn5_fw_info *fw_info, c= onst char *fw_name) fw_info->parity =3D 0x00; fw_info->rsp =3D NULL; fw_info->fw.fw =3D NULL; - strcpy(fw_info->fw_name, fw_name); + strscpy(fw_info->fw_name, fw_name); init_completion(&fw_info->completion); } =20 --=20 2.46.0