linux-yocto/tools/net/ynl
David Wei 4e3401aa6e tools: ynl-gen: validate 0 len strings from kernel
[ Upstream commit 4720f9707c ]

Strings from the kernel are guaranteed to be null terminated and
ynl_attr_validate() checks for this. But it doesn't check if the string
has a len of 0, which would cause problems when trying to access
data[len - 1]. Fix this by checking that len is positive.

Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://patch.msgid.link/20250503043050.861238-1-dw@davidwei.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-04 14:42:16 +02:00
..
generated
lib tools: ynl-gen: validate 0 len strings from kernel 2025-06-04 14:42:16 +02:00
samples
cli.py
ethtool.py tools/net/ynl: ethtool: fix crash when Hardware Clock info is missing 2025-05-22 14:12:16 +02:00
Makefile
Makefile.deps
requirements.txt
ynl-gen-c.py
ynl-regen.sh