[asterisk-bugs] [Asterisk 0015271]: BASE64_DECODE() adds garbage end end of decoded string

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Jun 4 10:16:24 CDT 2009


The following issue has been SUBMITTED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15271 
====================================================================== 
Reported By:                chappell
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   15271
Category:                   Functions/func_base64
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.24 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2009-06-04 10:16 CDT
Last Modified:              2009-06-04 10:16 CDT
====================================================================== 
Summary:                    BASE64_DECODE() adds garbage end end of decoded
string
Description: 
This problem has two causes:

1) BASE64_DECODE() fails to null terminate its return value. This becomes
evident if first a long string is decoded and then a short one.  The short
one will have have the last part of the long string appended to it.

2) What is more, ast_base64decode() does not recognize the equals signs
which pad the end of a string the length of which is not a multiple of
three bytes. Rather than stopping, it decodes the padding as data,
producing bogus output.  
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-04 10:16 chappell       New Issue                                    
2009-06-04 10:16 chappell       Asterisk Version          => 1.4.24          
2009-06-04 10:16 chappell       Regression                => No              
2009-06-04 10:16 chappell       SVN Branch (only for SVN checkouts, not tarball
releases) => N/A             
======================================================================




More information about the asterisk-bugs mailing list