From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta0.migadu.com (out-170.mta0.migadu.com [91.218.175.170]) (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 609F14EA398 for ; Tue, 19 May 2026 16:46:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779209180; cv=none; b=g3oH0vCcjb8FdNqPIOdt5qgT/xrrBAagP0ljNT7pYhenr6at1jLcEP/BsjXHt/d/61rpUEr0mDxwY9L5BYQTm4fcUy5RzEJZ/TlZ8ws9fghiSulSda4HZyieNzs2FDTL96Jw2gRlFEfskfHCK49wFz9l9yfRUOlD1P1I7Wa1Nm0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779209180; c=relaxed/simple; bh=MopHLoGC++NjaCWJc0M69L7Wg+kdlSApEd7RxFzWaFk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F3z1hiS1+bSUc3N2/yZ+sKN4Y2PI63Qnd/MqbXfzhExuaNoPgB5RYaY811dOQBi1X/zFom8OROaYfL6X3kyHAw4TuvemfHiJHXr2DmVz+DZPiF1lqAm10VqQPXkOcMC6lgIWoikJJumS8gYk9ua6sPw2p/A75Jno/0Z7DPXYK7o= 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=ooePWqEd; arc=none smtp.client-ip=91.218.175.170 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="ooePWqEd" 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=1779209177; 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: in-reply-to:in-reply-to:references:references; bh=nyYm0x78dd36zgT1XSQIWdlf3USAQjIyVllp3N/y/QI=; b=ooePWqEd7F6VGbs5stTyoGAXHZRcETxbAr81Ia99YZH8ZG3TpFf/m4gSQtZEjU7g/ZFw+x n7Bdzou3+xdLJANj6nUOuJO5dXY+vXhfGszSQ43i8rmhoMRJl9vD5t40RHll1vCW2eiPaM FpAizE0pZaIExBTxIWnLEL8vJxjruk4= From: Thorsten Blum To: Mikulas Patocka Cc: Thorsten Blum , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] fs: hpfs: replace deprecated strcpy with memcpy in hpfs_set_ea Date: Tue, 19 May 2026 18:45:12 +0200 Message-ID: <20260519164509.180686-6-thorsten.blum@linux.dev> In-Reply-To: <20260519164509.180686-4-thorsten.blum@linux.dev> References: <20260519164509.180686-4-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=914; i=thorsten.blum@linux.dev; h=from:subject; bh=MopHLoGC++NjaCWJc0M69L7Wg+kdlSApEd7RxFzWaFk=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDFk8k+dqGJZuu9hlWPfHPVNN2v8NV/SpZWwF3ywcO49fL jtxw+ZsRykLgxgXg6yYIsuDWT9m+JbWVG4yidgJM4eVCWQIAxenAExEfC8jw+9jj/RzihbWf1Ls bX+kq2PmwRT4XfLFsqUpbXMyl9Qc3MrIcHzhunMPL9rz3l26LFDhYkbypaOq4Uv0liSqP37VnjD fiwUA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT strcpy() is deprecated [1] and uses an additional strlen() internally; use memcpy() directly since we already know the length of the key and that it is guaranteed to be NUL-terminated. [1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy Signed-off-by: Thorsten Blum --- fs/hpfs/ea.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hpfs/ea.c b/fs/hpfs/ea.c index 1d7c1f67be9f..66776cb4f3fc 100644 --- a/fs/hpfs/ea.c +++ b/fs/hpfs/ea.c @@ -254,7 +254,7 @@ void hpfs_set_ea(struct inode *inode, struct fnode *fnode, const char *key, ea->namelen = key_len; ea->valuelen_lo = size; ea->valuelen_hi = size >> 8; - strcpy(ea->name, key); + memcpy(ea->name, key, key_len + 1); memcpy(ea_data(ea), data, size); fnode->ea_size_s = cpu_to_le16(le16_to_cpu(fnode->ea_size_s) + key_len + size + 5); goto ret;