From 890f4784c1483bbf9d4fbc83d9dd210b5b93d43e Mon Sep 17 00:00:00 2001 From: jpeeler Date: Fri, 15 Feb 2008 23:33:44 +0000 Subject: 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 --- zttranscode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zttranscode.c') diff --git a/zttranscode.c b/zttranscode.c index a550969..427c2f9 100644 --- a/zttranscode.c +++ b/zttranscode.c @@ -311,7 +311,7 @@ static int zt_tc_getinfo(unsigned long data) if (!tc) return -ENOSYS; - strncpy(info.name, tc->name, sizeof(info.name) - 1); + zap_copy_string(info.name, tc->name, sizeof(info.name)); info.numchannels = tc->numchannels; info.srcfmts = tc->srcfmts; info.dstfmts = tc->dstfmts; -- cgit v1.2.3