Hi Billiob,

Did you report this also to the tcllib maintainers? If not, anyone with
a newer tcllib installation (and all Fedora users) will still have the
bug.

Sander

On Fri, 2008-01-11 at 16:00 -0800, [EMAIL PROTECTED] wrote:
> Revision: 9360
>           http://amsn.svn.sourceforge.net/amsn/?rev=9360&view=rev
> Author:   billiob
> Date:     2008-01-11 16:00:22 -0800 (Fri, 11 Jan 2008)
> 
> Log Message:
> -----------
> fix bug #133
> 
> Modified Paths:
> --------------
>     trunk/amsn/utils/base64/base64.tcl
> 
> Modified: trunk/amsn/utils/base64/base64.tcl
> ===================================================================
> --- trunk/amsn/utils/base64/base64.tcl        2008-01-11 19:09:32 UTC (rev 
> 9359)
> +++ trunk/amsn/utils/base64/base64.tcl        2008-01-12 00:00:22 UTC (rev 
> 9360)
> @@ -280,6 +280,8 @@
>       binary scan $string c* X
>       
>       set output ""
> +
> +     set nums ""
>       
>       foreach x $X {
>           set bits [lindex $base64 $x]
> @@ -298,17 +300,20 @@
>               # padding characters.  If x=={}, we have 12 bits of input 
>               # (enough for 1 8-bit output).  If x!={}, we have 18 bits of
>               # input (enough for 2 8-bit outputs).
> -             
> -             foreach {v w z} $nums break
> -             set a [expr {($v << 2) | (($w & 0x30) >> 4)}]
> -             
> -             if {$z == {}} {
> -                 append output [binary format c $a ]
> -             } else {
> -                 set b [expr {(($w & 0xF) << 4) | (($z & 0x3C) >> 2)}]
> -                 append output [binary format cc $a $b]
> -             }               
> -             break
> +             # if string is just characters nor part of the Base64 alphabet 
> + '='
> +             # then nums is still "".
> +             if { $nums != ""} { 
> +                     foreach {v w z} $nums break
> +                     set a [expr {($v << 2) | (($w & 0x30) >> 4)}]
> +                     
> +                     if {$z == {}} {
> +                             append output [binary format c $a ]
> +                     } else {
> +                             set b [expr {(($w & 0xF) << 4) | (($z & 0x3C) 
> >> 2)}]
> +                             append output [binary format cc $a $b]
> +                     }               
> +                     break
> +             }
>           } else {
>               # RFC 2045 says that line breaks and other characters not part
>               # of the Base64 alphabet must be ignored, and that the decoder
> 
> 
> This was sent by the SourceForge.net collaborative development platform, the 
> world's largest Open Source development site.
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Amsn-commits mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/amsn-commits


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Amsn-devel mailing list
Amsn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amsn-devel

Reply via email to