[asterisk-bugs] [Asterisk 0018042]: [patch] inefficient strlen() in ast_uri_decode loop

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Sep 23 16:30:06 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18042 
====================================================================== 
Reported By:                wdoekes
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18042
Category:                   General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:           SVN 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!): 288635 
Request Review:              
====================================================================== 
Date Submitted:             2010-09-23 15:29 CDT
Last Modified:              2010-09-23 16:30 CDT
====================================================================== 
Summary:                    [patch] inefficient strlen() in ast_uri_decode loop
Description: 
Hi,

ast_uri_decode features a loop in which for every '%' encountered strlen()
is called. This is suboptimal.

Regards,
Walter
====================================================================== 

---------------------------------------------------------------------- 
 (0127347) schmidts (developer) - 2010-09-23 16:30
 https://issues.asterisk.org/view.php?id=18042#c127347 
---------------------------------------------------------------------- 
i dont know if this would be possible in any racecondition, but if s is
only one char long and set to '\0' your check wouldnt get this. 
The for loop would accept it cause its not a NULL pointer. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-23 16:30 schmidts       Note Added: 0127347                          
======================================================================




More information about the asterisk-bugs mailing list