diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2014-05-06 21:07:13 +0200 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2014-05-06 21:07:13 +0200 |
commit | c29948407c6e1960b9ca0ff3f1479773c95d25c9 (patch) | |
tree | 5f715822063ff02b2cbf02acf66a71958cee2e3b | |
parent | 9fcaf703f93658ec0ae2ae1013b191a76835b94a (diff) |
arptables: fix potential buffer overflow (author: dcb)
-rw-r--r-- | arptables.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arptables.c b/arptables.c index 3fb8ed5..64ac3aa 100644 --- a/arptables.c +++ b/arptables.c @@ -763,6 +763,7 @@ parse_hostnetworkmask(const char *name, struct in_addr **addrpp, int i, j, k, n; strncpy(buf, name, sizeof(buf) - 1); + buf[sizeof(buf) - 1] = '\0'; if ((p = strrchr(buf, '/')) != NULL) { *p = '\0'; addrp = parse_mask(p + 1); |