diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-25 17:48:40 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2009-02-25 17:48:40 +0200 |
commit | 1c195ab280da561f38e54449e4eb3d6882c69b3b (patch) | |
tree | 12583570730c9e5a1505416aa445666aa1449f6b /network/bridge.c | |
parent | d7aa6d1b2d6f3fc48b8287ea04c741078b22f2da (diff) |
Fix strncpy length parameters to avoid non-nul-terminated strings
Diffstat (limited to 'network/bridge.c')
-rw-r--r-- | network/bridge.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/network/bridge.c b/network/bridge.c index 7d84349e..995da5c9 100644 --- a/network/bridge.c +++ b/network/bridge.c @@ -120,7 +120,7 @@ int bridge_add_interface(int id, const char *dev) return -ENODEV; memset(&ifr, 0, sizeof(ifr)); - strncpy(ifr.ifr_name, name, IFNAMSIZ); + strncpy(ifr.ifr_name, name, IFNAMSIZ - 1); ifr.ifr_ifindex = ifindex; err = ioctl(bridge_socket, SIOCBRADDIF, &ifr); |