From 23a324c0a98aba6d1bd13718d0d49d503c5987e0 Mon Sep 17 00:00:00 2001 From: jpeeler Date: Mon, 18 Feb 2008 17:32:26 +0000 Subject: 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 --- sethdlc-new.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sethdlc-new.c') diff --git a/sethdlc-new.c b/sethdlc-new.c index 1765c32..376a3f4 100644 --- a/sethdlc-new.c +++ b/sethdlc-new.c @@ -673,7 +673,7 @@ int main(int arg_c, char *arg_v[]) if (sock < 0) error("Unable to create socket: %s\n", strerror(errno)); - strncpy(req.ifr_name, argv[1], sizeof(req.ifr_name) - 1); /* Device name */ + zap_copy_string(req.ifr_name, argv[1], sizeof(req.ifr_name)); /* Device name */ if (argc == 2) show_port(); -- cgit v1.2.3