aboutsummaryrefslogtreecommitdiffstats
path: root/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'acl.c')
-rwxr-xr-xacl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/acl.c b/acl.c
index 7cd4cd1ee..85abe84f7 100755
--- a/acl.c
+++ b/acl.c
@@ -146,7 +146,7 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
path = path->next;
}
if (ha) {
- strncpy(tmp, stuff, sizeof(tmp) - 1);
+ ast_copy_string(tmp, stuff, sizeof(tmp));
nm = strchr(tmp, '/');
if (!nm)
nm = "255.255.255.255";
@@ -248,7 +248,7 @@ int ast_lookup_iface(char *iface, struct in_addr *address)
struct my_ifreq ifreq;
memset(&ifreq, 0, sizeof(ifreq));
- strncpy(ifreq.ifrn_name,iface,sizeof(ifreq.ifrn_name) - 1);
+ ast_copy_string(ifreq.ifrn_name,iface,sizeof(ifreq.ifrn_name));
mysock = socket(PF_INET,SOCK_DGRAM,IPPROTO_IP);
res = ioctl(mysock,SIOCGIFADDR,&ifreq);