[svn-commits] file: branch 1.2 r3258 - /branches/1.2/ztdynamic.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 28 16:52:55 CST 2007


Author: file
Date: Wed Nov 28 16:52:54 2007
New Revision: 3258

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3258
Log:
Pass the correct variable to sizeof when copying the driver name.
(closes issue #11352)
Reported by: brettcar
Patches:
      ztdynamic.c.patch uploaded by eliel (license 64)

Modified:
    branches/1.2/ztdynamic.c

Modified: branches/1.2/ztdynamic.c
URL: http://svn.digium.com/view/zaptel/branches/1.2/ztdynamic.c?view=diff&rev=3258&r1=3257&r2=3258
==============================================================================
--- branches/1.2/ztdynamic.c (original)
+++ branches/1.2/ztdynamic.c Wed Nov 28 16:52:54 2007
@@ -582,7 +582,7 @@
 	memset(z->msgbuf, 0, bufsize);
 
 	/* Setup parameters properly assuming we're going to be okay. */
-	strncpy(z->dname, zds->driver, sizeof(z->driver) - 1);
+	strncpy(z->dname, zds->driver, sizeof(z->dname) - 1);
 	strncpy(z->addr, zds->addr, sizeof(z->addr) - 1);
 	z->timing = zds->timing;
 	sprintf(z->span.name, "ZTD/%s/%s", zds->driver, zds->addr);




More information about the svn-commits mailing list