Re: [PATCH] ocfs2: Replace deprecated strcpy with strscpy
From: Thorsten Blum
Date: Thu Nov 27 2025 - 05:14:36 EST
On 27. Nov 2025, at 02:13, Joseph Qi wrote:
> On 2025/11/26 19:44, Thorsten Blum wrote:
>> 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 [1]
>> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
>> ---
>> [...]
>
> It seems that all 'include' above are not needed.
They might not be necessary for the code to compile, but I think it's
recommended to add the headers to make the relationship explicit.
Thanks,
Thorsten