diff options
author | Volker Lendecke <vl@samba.org> | 2015-03-07 10:29:21 +0000 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2015-03-10 21:48:03 +0100 |
commit | 621bd0784290f24e229caf0590206805f6f2e75c (patch) | |
tree | 7c7379e0285b1ddb259713c3c9c4fc729ab38f97 | |
parent | f6a75cf4d18621e05206368b6811057450f65d75 (diff) | |
download | samba-621bd0784290f24e229caf0590206805f6f2e75c.tar.gz samba-621bd0784290f24e229caf0590206805f6f2e75c.tar.xz samba-621bd0784290f24e229caf0590206805f6f2e75c.zip |
ctdb: Fix 1125553 Buffer not null terminated
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
-rw-r--r-- | ctdb/common/system_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/common/system_linux.c b/ctdb/common/system_linux.c index 97a57ac8b6..fdb8d12757 100644 --- a/ctdb/common/system_linux.c +++ b/ctdb/common/system_linux.c @@ -100,7 +100,7 @@ int ctdb_sys_send_arp(const ctdb_sock_addr *addr, const char *iface) } DEBUG(DEBUG_DEBUG, (__location__ " Created SOCKET FD:%d for sending arp\n", s)); - strncpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)-1); + strlcpy(ifr.ifr_name, iface, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) { DEBUG(DEBUG_CRIT,(__location__ " interface '%s' not found\n", iface)); close(s); |