summaryrefslogtreecommitdiff
path: root/tonezone.c
diff options
context:
space:
mode:
authorjpeeler <jpeeler@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-02-15 23:33:44 +0000
committerjpeeler <jpeeler@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-02-15 23:33:44 +0000
commit890f4784c1483bbf9d4fbc83d9dd210b5b93d43e (patch)
treea6e737a6434cb08ac4cbb9cde4f38e0ea98d7c01 /tonezone.c
parentc1cbe89ec4051c38ec600cc8b4cc0ed0deb10bb4 (diff)
Fixes bug 11471. Replaced all instances of strncpy with zap_copy_string (added to zaptel.h) to fix any off by one errors and ensure destination string is NULL terminated.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3833 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'tonezone.c')
-rw-r--r--tonezone.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tonezone.c b/tonezone.c
index deb1ac1..d38221b 100644
--- a/tonezone.c
+++ b/tonezone.c
@@ -274,7 +274,7 @@ int tone_zone_register_zone(int fd, struct tone_zone *z)
}
h->count = count;
h->zone = z->zone;
- strncpy(h->name, z->description, sizeof(h->name));
+ zap_copy_string(h->name, z->description, sizeof(h->name));
x = z->zone;
ioctl(fd, ZT_FREEZONE, &x);
res = ioctl(fd, ZT_LOADZONE, h);