aboutsummaryrefslogtreecommitdiffstats
path: root/interface.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2009-01-06 18:00:21 +0000
committerMatthias Andree <matthias.andree@gmx.de>2009-01-06 18:00:21 +0000
commita804c2b676aa9629bea657e78d5e6803b85228cc (patch)
tree4f6601827cfd4c7c74edee679ec9e5046a89d04d /interface.c
parentdf741344c71e5538d1c504a7d0f9ecc1d9ff4945 (diff)
downloadfetchmail-a804c2b676aa9629bea657e78d5e6803b85228cc.tar.gz
fetchmail-a804c2b676aa9629bea657e78d5e6803b85228cc.tar.bz2
fetchmail-a804c2b676aa9629bea657e78d5e6803b85228cc.zip
Fix: Do not overlap source and destination fields in snprintf() in
interface.c. Courtesy of Nico Golde, Debian. svn path=/branches/BRANCH_6-3/; revision=5260
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/interface.c b/interface.c
index c9a5db01..70e99ba9 100644
--- a/interface.c
+++ b/interface.c
@@ -271,7 +271,7 @@ get_ifinfo(const char *ifname, ifinfo_t *ifinfo)
{
kvm_read(kvmfd, ifnet_addr, &ifnet, sizeof(ifnet));
kvm_read(kvmfd, (unsigned long) ifnet.if_name, tname, sizeof tname);
- snprintf(tname, sizeof tname, "%s%d", tname, ifnet.if_unit);
+ snprintf(tname + strlen(tname), sizeof(tname) - strlen(tname), "%d", ifnet.if_unit);
if (!strcmp(tname, iname))
{