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

Thomas Haller thaller at redhat.com
Wed Jun 25 03:55:15 PDT 2014


On Wed, 2014-06-25 at 10:11 +0200, 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>


merged as

https://github.com/thom311/libnl/commit/558df52e6e9712c51e5cb4b135bac059d6fa3dbd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/libnl/attachments/20140625/90726237/attachment.sig>


More information about the libnl mailing list