[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:07 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: 3259
_U branches/1.4/
U branches/1.4/ztdynamic.c
------------------------------------------------------------------------
r3259 | file | 2008-06-07 13:34:05 -0500 (Sat, 07 Jun 2008) | 14 lines
Merged revisions 3258 via svnmerge from
https://origsvn.digium.com/svn/zaptel/branches/1.2
........
r3258 | file | 2007-11-28 18:52:54 -0400 (Wed, 28 Nov 2007) | 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=3259
Issue History
Date Modified Username Field Change
======================================================================
06-07-08 13:34 svnbot Checkin
06-07-08 13:34 svnbot Note Added: 0088336
======================================================================
More information about the asterisk-bugs
mailing list