ext4: use memcpy() instead of strcpy()
authorTheodore Ts'o <tytso@mit.edu>
Sat, 12 Jul 2025 18:12:48 +0000 (14:12 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 18 Jul 2025 03:25:21 +0000 (23:25 -0400)
commita35454ecf8a320c49954fdcdae0e8d3323067632
treeedf900a21a3a4538cdb3b3812b6f5bc8f1239dff
parent3658b8b3398eb2a49ee8d1ac88e5cdc41764f1c9
ext4: use memcpy() instead of strcpy()

The strcpy() function is considered dangerous and eeeevil by people
who are using sophisticated code analysis tools such as "grep".  This
is true even when a quick inspection would show that the source is a
constant string ("." or "..") and the destination is a fixed array
which is guaranteed to have enough space.  Make the "grep" code
analysis tool happy by using memcpy() isstead of strcpy().  :-)

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://patch.msgid.link/20250712181249.434530-2-tytso@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/inline.c
fs/ext4/namei.c