linux/tools/net
Thaison Phan 153f709c86 tools: ynl: check alloc fails in generated getter code
Generated YNL getter code does not check the return value of malloc() and
calloc() before passing the resulting pointer to memcpy(). This could lead
to a NULL pointer dereference on memory allocation failure.

Updated the C code generator to check for allocation failures and to return
an error code in getters.

Signed-off-by: Thaison Phan <thaisonphan@google.com>
Link: https://patch.msgid.link/20260807171500.7188-3-thaisonphan@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-08-10 18:23:11 -07:00
..
sunrpc xdrgen: Implement pass-through lines in specifications 2026-01-29 09:48:33 -05:00
ynl tools: ynl: check alloc fails in generated getter code 2026-08-10 18:23:11 -07:00