[PATCH 1/1] attr: nla_get_u64() should return 0 if the attribute does not fully contain 64 bit

Thomas Graf tgraf at suug.ch
Wed Jun 25 03:15:45 PDT 2014


On 06/25/14 at 10:11am, Thomas Haller wrote:
> Manually "inline" nla_memcpy() to nla_get_u64() and change the behavior
> to return always zero (0) if the attribute does not contain at least
> sizeof(uint64_t) bytes. Also considering endianness, reading a truncated integer
> does not seem to be useful and should result in a defined behavior
> instead.
> 
> Signed-off-by: Thomas Haller <thaller at redhat.com>

Acked-by: Thomas Graf <tgraf at suug.ch>



More information about the libnl mailing list