Le 08/12/2012 16:14, Justin Vallon a écrit :
On 12/6/12 1:18 AM, Frank Meerkötter wrote:
@@ -345,7 +345,7 @@ int system_bridge_delif(struct device *bridge,
struct device *dev)
static int system_if_resolve(struct device *dev)
{
struct ifreq ifr;
-strncpy(ifr.ifr_name, dev->ifname, s
On 12/6/12 1:18 AM, Frank Meerkötter wrote:
@@ -345,7 +345,7 @@ int system_bridge_delif(struct device *bridge, struct device *dev)
static int system_if_resolve(struct device *dev)
{
struct ifreq ifr;
- strncpy(ifr.ifr_name, dev->ifname, sizeof(ifr.ifr_name));
+ strncpy(
From the man page:
[...]
The strncpy() function is similar, except that at most n
bytes of src are copied. Warning: If there is no null byte
among the first n bytes of src, the string placed in dest
will not be null-terminated.
[...]
Signed-off-by: Frank Meerkötter
---
sy