ocfs2: replace deprecated strcpy with strscpy
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 26 Nov 2025 11:44:15 +0000 (12:44 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 11 Dec 2025 00:07:42 +0000 (16:07 -0800)
commitd86fea4294cb7878e3866eb567ee803d180a159b
treee76fc7773563b9ccfed0a9c4458cbc5535905afa
parent4ac577ae741e745ecfb64c5a9c7f52fc36aca022
ocfs2: replace deprecated strcpy with strscpy

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().  No functional changes.

Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strcpy
Link: https://lkml.kernel.org/r/20251126114419.92539-1-thorsten.blum@linux.dev
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/alloc.c
fs/ocfs2/cluster/nodemanager.c
fs/ocfs2/dir.c
fs/ocfs2/namei.c
fs/ocfs2/stackglue.c
fs/ocfs2/suballoc.c