-
nl: avoid NULL pointer dereference · c8f05589Rafał Miłecki authored
It's a valid case to call nla_put() with NULL data and 0 len. It's done e.g. in the nla_put_attr(). There has to be a check for data in nla_put() as passing NULL to the memcpy() is not allowed. Even if length is 0, both pointers have to be valid. For a reference see C99 standard (7.21.1/2), it says: "pointer arguments on such a call shall still have valid values". Reported-by:
Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us> Signed-off-by:
Rafał Miłecki <rafal@milecki.pl> [christian.brauner@ubuntu.com: adapted commit message] Signed-off-by:
Christian Brauner <christian.brauner@ubuntu.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |