]> www.infradead.org Git - users/jedix/linux-maple.git/commit
params: Replace deprecated strcpy() with strscpy() and memcpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Wed, 13 Aug 2025 13:21:59 +0000 (15:21 +0200)
committerDaniel Gomez <da.gomez@samsung.com>
Sat, 16 Aug 2025 19:47:25 +0000 (21:47 +0200)
commit5eb4b9a4cdbb70d70377fe8fb2920b75910e5024
treef89e7d7245a276c4c59395f9425f389609ad7d9e
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
params: Replace deprecated strcpy() with strscpy() and memcpy()

strcpy() is deprecated; use strscpy() and memcpy() instead.

In param_set_copystring(), we can safely use memcpy() because we already
know the length of the source string 'val' and that it is guaranteed to
be NUL-terminated within the first 'kps->maxlen' bytes.

Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Link: https://lore.kernel.org/r/20250813132200.184064-2-thorsten.blum@linux.dev
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
kernel/params.c