Re: [lxc-devel] [PATCH] check for data in nla_put() to avoid invalid memcpy() calls

2018-07-29 Thread Rafał Miłecki
On Sun, 29 Jul 2018 at 18:39, Christian Brauner wrote: > On Sun, Jul 29, 2018 at 05:44:06PM +0200, Rafał Miłecki wrote: > > From: Rafał Miłecki > > > > 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(). >

[lxc-devel] [PATCH] check for data in nla_put() to avoid invalid memcpy() calls

2018-07-29 Thread Rafał Miłecki
From: Rafał Miłecki 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 referen

[lxc-devel] Getting complex data (structs) from a container (net ns) in API

2018-02-06 Thread Rafał Miłecki
Hi, currently lxccontainer's API has two functions for getting net info: char** (*get_interfaces)(struct lxc_container *c); char** (*get_ips)(struct lxc_container *c, const char* interface, const char* family, int scope); I'd like to get more detailed info about container's interfaces like a l