[asterisk-bugs] [Gastman 0011352]: Wrong argument in strncpy() causes problems with ztdynamic clients

noreply at bugs.digium.com noreply at bugs.digium.com
Wed Nov 28 16:50:20 CST 2007


The following issue has been ASSIGNED. 
====================================================================== 
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:                     assigned
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:              
====================================================================== 
Date Submitted:             11-22-2007 14:26 CST
Last Modified:              11-28-2007 16:50 CST
====================================================================== 
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 - 11-28-07 16:50  
---------------------------------------------------------------------- 
Repository: zaptel
Revision: 3258

U   branches/1.2/ztdynamic.c

------------------------------------------------------------------------
r3258 | file | 2007-11-28 16:50:19 -0600 (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)

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-28-07 16:50  svnbot         Note Added: 0074521                          
11-28-07 16:50  svnbot         Status                   new => assigned     
11-28-07 16:50  svnbot         Assigned To               => file            
======================================================================




More information about the asterisk-bugs mailing list