diff options
author | file <file@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-11-28 22:52:54 +0000 |
---|---|---|
committer | file <file@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-11-28 22:52:54 +0000 |
commit | 7521b0cc52e5fe9a7a7fbc0d8a22d4e528ccee90 (patch) | |
tree | f3b851c279abd0eeb86f92756b36acd2aeeb24c0 /ztdynamic.c | |
parent | c0de14aa2283e8df6a778a44d18154c9b613b5be (diff) |
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)
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3258 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztdynamic.c')
-rw-r--r-- | ztdynamic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ztdynamic.c b/ztdynamic.c index 825f6ee..5147cf0 100644 --- a/ztdynamic.c +++ b/ztdynamic.c @@ -582,7 +582,7 @@ static int create_dynamic(ZT_DYNAMIC_SPAN *zds) 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); |