From nobody Sun Feb 8 01:30:05 2026 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (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 5C1282EE607 for ; Sun, 18 Jan 2026 17:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768757641; cv=none; b=DN0aatDnpT5UHIoos9QoFytkIt6wKsEmxXJwCOjC/tcQAfOIme85kYyEXDEIDu7T4CfuRxXteyCxX0Wrpm9ejbn7EnDCRGiKXaxQAH+ayk+DbL0g9X4dRYuK/HL0+yvAz3QWoWF9rcN8Q6ob5xHQjdmnJhw0Pql1zYrNBp1nofc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768757641; c=relaxed/simple; bh=yQrvuAM+jyAa30aIDV8qGFS0NmslnywQ3ZtSVoKChjc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cV8h4r+M9tGPtzLhOKBlyG2PMtcwct0tpIYmEu1MmHVhfR9vrC8DQ0Ilq5ET11XqqUQPK7pdC9iQmW+5wea/N/Cy2jFrBunl46+Hap8vo/NPPoSe3obhCzPBVxmynuciqqP62kWt/Kj2Sp02iD290dSGHsyhUflnO0Fz6uR89wA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=I8zcESbG; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="I8zcESbG" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1768757638; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2t/tirZ2t6GUke0fiFkoZfIjHR57XL3GSnj23R3fG3s=; b=I8zcESbGD6z5UCziVUc2HKLfdA218Hlb0zqnBVccK5F+cnV5upenayJAMM3+geLA2Pffny N5hPd2Wq1bSKkGPCE4T4wKCHUEd8OlIQuSWez/fxKhEBIoN+CQpghxOvWTL18o4ZK0uUnq 0XELhb7ol2zelZsHK+wh88qou7/ZonM= From: Thorsten Blum To: Greg Ungerer , Geert Uytterhoeven Cc: Thorsten Blum , linux-m68k@lists.linux-m68k.org, linux-kernel@vger.kernel.org Subject: [PATCH] m68knommu: Replace deprecated strcpy with strscpy in init_ucsimm Date: Sun, 18 Jan 2026 18:33:49 +0100 Message-ID: <20260118173349.1197500-2-thorsten.blum@linux.dev> 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 X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" strcpy() has been deprecated [1] because it performs no bounds checking on the destination buffer, which can lead to buffer overflows. Replace it with the safer strscpy(). Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy= [1] Signed-off-by: Thorsten Blum --- Compile-tested only. --- arch/m68k/68000/ucsimm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/m68k/68000/ucsimm.c b/arch/m68k/68000/ucsimm.c index c54fde75eae8..6b84e826040f 100644 --- a/arch/m68k/68000/ucsimm.c +++ b/arch/m68k/68000/ucsimm.c @@ -9,6 +9,7 @@ * for more details. */ #include +#include #include #include #include @@ -31,7 +32,7 @@ void __init init_ucsimm(char *command, int size) pr_info("uCsimm/uCdimm hwaddr %pM\n", p); p =3D getbenv("APPEND"); if (p) - strcpy(p, command); + strscpy(p, command, size); else command[0] =3D 0; } --=20 Thorsten Blum GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4