mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01: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/20260831144953.324441-1-hrushirajg23@gmail.com Signed-off-by: Hrushiraj Gandhi <hrushirajg23@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Bradley Morgan <brads@mainlining.org> Cc: Peter Oberparleiter <oberpar@linux.ibm.com> |
||
|---|---|---|
| .. | ||
| base.c | ||
| clang.c | ||
| fs.c | ||
| gcc_4_7.c | ||
| gcc_base.c | ||
| gcov.h | ||
| Kconfig | ||
| Makefile | ||