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 --- kernel/wctdm24xxp/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/wctdm24xxp/base.c') diff --git a/kernel/wctdm24xxp/base.c b/kernel/wctdm24xxp/base.c index 886bdab..8f5ae14 100644 --- a/kernel/wctdm24xxp/base.c +++ b/kernel/wctdm24xxp/base.c @@ -3137,7 +3137,7 @@ static int wctdm_initialize(struct wctdm *wc) "PCI%s Bus %02d Slot %02d", (wc->flags[0] & FLAG_EXPRESS) ? " Express" : "", wc->dev->bus->number, PCI_SLOT(wc->dev->devfn) + 1); wc->span.manufacturer = "Digium"; - strncpy(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype) - 1); + zap_copy_string(wc->span.devicetype, wc->variety, sizeof(wc->span.devicetype)); if (alawoverride) { printk("ALAW override parameter detected. Device will be operating in ALAW\n"); wc->span.deflaw = ZT_LAW_ALAW; -- cgit v1.2.3