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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 19 13:03:33 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18042 
====================================================================== 
Reported By:                wdoekes
Assigned To:                seanbright
====================================================================== 
Project:                    Asterisk
Issue ID:                   18042
Category:                   General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     closed
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:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2010-09-23 15:29 CDT
Last Modified:              2011-01-19 13:03 CST
====================================================================== 
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
====================================================================== 

---------------------------------------------------------------------- 
 (0130721) svnbot (reporter) - 2011-01-19 13:03
 https://issues.asterisk.org/view.php?id=18042#c130721 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 302555

_U  branches/1.8/
U   branches/1.8/main/utils.c

------------------------------------------------------------------------
r302555 | seanbright | 2011-01-19 13:03:33 -0600 (Wed, 19 Jan 2011) | 14
lines

Merged revisions 302554 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.6.2

........
  r302554 | seanbright | 2011-01-19 14:02:29 -0500 (Wed, 19 Jan 2011) | 7
lines
  
  Don't call strlen() when we only need to look at the next character or
two.
  
  (closes issue https://issues.asterisk.org/view.php?id=18042)
  Reported by: wdoekes
  Patches:
        astsvn-inefficient-ast-uri-decode.patch uploaded by wdoekes
(license 717)
........

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

http://svn.digium.com/view/asterisk?view=rev&revision=302555 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-19 13:03 svnbot         Checkin                                      
2011-01-19 13:03 svnbot         Note Added: 0130721                          
======================================================================




More information about the asterisk-bugs mailing list