[asterisk-bugs] [Asterisk 0010843]: [JANITOR] Change simple snprintf to ast_copy_string

noreply at bugs.digium.com noreply at bugs.digium.com
Sat Sep 29 07:54:38 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://bugs.digium.com/view.php?id=10843 
====================================================================== 
Reported By:                Corydon76
Assigned To:                mvanbaak
====================================================================== 
Project:                    Asterisk
Issue ID:                   10843
Category:                   Core-General
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     assigned
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             09-28-2007 09:13 CDT
Last Modified:              09-29-2007 07:54 CDT
====================================================================== 
Summary:                    [JANITOR] Change simple snprintf to ast_copy_string
Description: 
There are a good number of places in the code that we needlessly call
snprintf(), when a plain string copy (ast_copy_string) will do.  Note that
a
simple rearrangement of the arguments is necessary, from:

snprintf(A, B, C);

to

ast_copy_string(A, C, B);

You can find most of the cases in the code with the following shell
command:

find . -name \*.c -exec grep -EHn 'snprintf\([^,]*,[^,]*,[^,]*\);' {} \;
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-29-07 07:54  mvanbaak       Status                   new => assigned     
09-29-07 07:54  mvanbaak       Assigned To               => mvanbaak        
======================================================================




More information about the asterisk-bugs mailing list