summaryrefslogtreecommitdiff
path: root/wct4xxp
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 /wct4xxp
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 'wct4xxp')
-rw-r--r--wct4xxp/wct4xxp-diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wct4xxp/wct4xxp-diag.c b/wct4xxp/wct4xxp-diag.c
index 50a328d..8c14611 100644
--- a/wct4xxp/wct4xxp-diag.c
+++ b/wct4xxp/wct4xxp-diag.c
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
exit(1);
}
if (*(argv[1]) == '/')
- strncpy(fn, argv[1], sizeof(fn) - 1);
+ zap_copy_string(fn, argv[1], sizeof(fn));
else
snprintf(fn, sizeof(fn), "/dev/zap/%d", atoi(argv[1]));
fd = open(fn, O_RDWR);