[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [DotGNU]infinite while loop, i think in Convert.ToBase64Strin g()
From: |
Dawkins, David |
Subject: |
RE: [DotGNU]infinite while loop, i think in Convert.ToBase64Strin g() |
Date: |
Tue, 31 Dec 2002 02:50:38 -0500 |
add some diags and see what value size starts at.
add some diags and track the value of numBits through that inner loop.
track the value of "bits >> numBits".
DavidD
> -----Original Message-----
> From: minddog [mailto:address@hidden
> Sent: 31 December 2002 07:29
> To: address@hidden
> Subject: [DotGNU]infinite while loop, i think in
> Convert.ToBase64String()
>
>
> Okay, was doin some base64 hackin and found this after adding
> --numBits and
> ++numBits:
>
>
>
> address@hidden:~/dotgnu/pnetlib$ ilrun
> ../homebrew-samples/a.out.exe
> Uncaught exception: System.IndexOutOfRangeException: An array
> index was out of
> range
> at System.Convert.ToBase64String(Byte[], Int32, Int32) in
> ./System/Convert.cs:2633
> at Sample.Main()
>
> to this:
>
> 2626 while(size > 0)
> 2627 {
> 2628 bits = (bits << 8) +
> inArray[offset++];
> 2629 numBits += 8;
> 2630 --size;
> 2631 while(numBits >= 6)
> 2632 {
> 2633
> builder.Append(base64[bits >> numBits]);
> 2634 bits
> &= ((1 <<
> numBits) - 1);
> 2635 //
> infinite loop if no ++numBits or --numBits
> 2636 }
> 2637 }
>
>
> Can anyone determine whats up?
> --
> --minddog( Adam Ballai )
>
> "I try to take it one day at a time, but several of them
> attack me at once."
> -mistyflip
> _______________________________________________
> Developers mailing list
> address@hidden
> http://www.dotgnu.org/mailman/listinfo/developers
>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- RE: [DotGNU]infinite while loop, i think in Convert.ToBase64Strin g(),
Dawkins, David <=