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

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jan 19 13:04:26 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:04 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
====================================================================== 

---------------------------------------------------------------------- 
 (0130722) svnbot (reporter) - 2011-01-19 13:04
 https://issues.asterisk.org/view.php?id=18042#c130722 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 302556

_U  trunk/
U   trunk/main/utils.c

------------------------------------------------------------------------
r302556 | seanbright | 2011-01-19 13:04:25 -0600 (Wed, 19 Jan 2011) | 21
lines

Merged revisions 302555 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r302555 | seanbright | 2011-01-19 14:03:32 -0500 (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=302556 

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




More information about the asterisk-bugs mailing list