diff options
author | maxim <maxim@FreeBSD.org> | 2007-04-14 16:09:23 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2007-04-14 16:09:23 +0000 |
commit | 0fd629d52d0b8d99592c84459ff6e374a17b06b0 (patch) | |
tree | e6dd3ecbf8d37ae290f509605f262311c174e91d /sbin/atm/atmconfig/diag.c | |
parent | 7b7ec1c0c76558d49e9e171e647c7d734ad807ad (diff) | |
download | FreeBSD-src-0fd629d52d0b8d99592c84459ff6e374a17b06b0.zip FreeBSD-src-0fd629d52d0b8d99592c84459ff6e374a17b06b0.tar.gz |
o IFNAMSIZ includes a terminating null byte.
Submitted by: rdivacky
MFC after: 1 week
Diffstat (limited to 'sbin/atm/atmconfig/diag.c')
-rw-r--r-- | sbin/atm/atmconfig/diag.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/atm/atmconfig/diag.c b/sbin/atm/atmconfig/diag.c index 547d364..699d5cc 100644 --- a/sbin/atm/atmconfig/diag.c +++ b/sbin/atm/atmconfig/diag.c @@ -868,7 +868,7 @@ diagif_fetch_vcc(struct diagif *aif, int fd) return; strncpy(ifr.ifr_name, aif->ifname, IFNAMSIZ); - ifr.ifr_name[IFNAMSIZ] = '\0'; + ifr.ifr_name[IFNAMSIZ - 1] = '\0'; aif->vtab = malloc(sizeof(*aif->vtab) + sizeof(aif->vtab->vccs[0]) * aif->mib.max_vccs); |