diff options
author | jpeeler <jpeeler@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-02-18 17:32:26 +0000 |
---|---|---|
committer | jpeeler <jpeeler@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-02-18 17:32:26 +0000 |
commit | 23a324c0a98aba6d1bd13718d0d49d503c5987e0 (patch) | |
tree | 726099eee04498d137f1d9a3da25c8bd6067a10f /tonezone.c | |
parent | 517b95c8dd353100be49168eee07fc8966db23c2 (diff) |
Closes issue #11471. Replaced 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.4@3846 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'tonezone.c')
-rw-r--r-- | tonezone.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -323,7 +323,7 @@ int tone_zone_register_zone(int fd, struct tone_zone *z) space -= sizeof(*h); h->zone = z->zone; - strncpy(h->name, z->description, sizeof(h->name) - 1); + zap_copy_string(h->name, z->description, sizeof(h->name)); for (x = 0; x < ZT_MAX_CADENCE; x++) h->ringcadence[x] = z->ringcadence[x]; |