mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 13:03:48 +00:00
node->name is a flexible array member sized to exactly strlen(name) + 1 bytes at allocation time in new_node(), so this copy can never actually overflow. Still, prefer the bounded strscpy() over strcpy() on general principle; pass the same strlen(name) + 1 bound the allocation used, since sizeof() cannot be applied to a flexible array member. No functional change. Link: https://lore.kernel.org/[email protected] Signed-off-by: Hrushiraj Gandhi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Bradley Morgan <[email protected]> Cc: Peter Oberparleiter <[email protected]>