[asterisk-bugs] [Gastman 0011352]: Wrong argument in strncpy() causes problems with ztdynamic clients
noreply at bugs.digium.com
noreply at bugs.digium.com
Sat Jun 7 13:34:04 CDT 2008
A NOTE has been added to this issue.
======================================================================
http://bugs.digium.com/view.php?id=11352
======================================================================
Reported By: brettcar
Assigned To: file
======================================================================
Project: Gastman
Issue ID: 11352
Category: General
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Zaptel Version: SVN
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 3245
Disclaimer on File?: N/A
Request Review:
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 11-22-2007 14:26 CST
Last Modified: 06-07-2008 13:34 CDT
======================================================================
Summary: Wrong argument in strncpy() causes problems with
ztdynamic clients
Description:
In ztdynamic.c:614 the line is
strncpy(z->dname, zds->driver, sizeof(z->driver) - 1);
Clearly the argument in sizeof() is returning the wrong information here.
If drivers with long names are used ztdynamic will only copy a subset of
the name into z->dname. Essentially, z->dname is getting truncated.
======================================================================
----------------------------------------------------------------------
svnbot - 06-07-08 13:34
----------------------------------------------------------------------
Repository: dahdi
Revision: 3258
U branches/1.2/ztdynamic.c
------------------------------------------------------------------------
r3258 | file | 2008-06-07 13:34:02 -0500 (Sat, 07 Jun 2008) | 6 lines
Pass the correct variable to sizeof when copying the driver name.
(closes issue http://bugs.digium.com/view.php?id=11352)
Reported by: brettcar
Patches:
ztdynamic.c.patch uploaded by eliel (license 64)
------------------------------------------------------------------------
http://svn.digium.com/view/dahdi?view=rev&revision=3258
Issue History
Date Modified Username Field Change
======================================================================
06-07-08 13:34 svnbot Note Added: 0088335
======================================================================
More information about the asterisk-bugs
mailing list