mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
sparc: Replace deprecated strcpy() with strscpy() in handle_nextprop_quirks()
strcpy() is deprecated; use strscpy() instead. No functional changes intended. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Andreas Larsson <andreas@gaisler.com> Signed-off-by: Andreas Larsson <andreas@gaisler.com>
This commit is contained in:
committed by
Andreas Larsson
parent
79f76dfb4e
commit
fe0126702a
@@ -120,11 +120,14 @@ EXPORT_SYMBOL(of_find_in_proplist);
|
||||
*/
|
||||
static int __init handle_nextprop_quirks(char *buf, const char *name)
|
||||
{
|
||||
if (!name || strlen(name) == 0)
|
||||
size_t name_len;
|
||||
|
||||
name_len = name ? strlen(name) : 0;
|
||||
if (name_len == 0)
|
||||
return -1;
|
||||
|
||||
#ifdef CONFIG_SPARC32
|
||||
strcpy(buf, name);
|
||||
strscpy(buf, name, name_len + 1);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user