mirror of https://github.com/torvalds/linux.git
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:
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue