|
From: | walt |
Subject: | Re: [Pan-users] Re: Error saving large JPEG image |
Date: | Thu, 13 Aug 2009 08:37:30 -0700 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3pre) Gecko/20090813 Shredder/3.0b4pre |
On 08/13/2009 06:50 AM, Rhialto wrote:
On Wed 12 Aug 2009 at 20:11:47 -0700, walt wrote:Now, that last line begins with 'E', so uudeview figures that this line of code should contain (69-32)*4/3 characters, which is 49.3. It then reads the next 49 chars from that line and proceeds to uudecode them, even though it produces garbage.An easy check is to see if the line has the correct number of characters on it. In fact it may have one more: some versions of uuencode add an extra checksum character at the end of the line. But then it should match, of course. And fractional numbers of characters are not possible :)
That just may be the right test to make, too. After reading through the uudeview code (contained in uuscan.c) I see that this is an old and all-too familiar problem with uuencoding apps. The problem is always that last line at the end of the encoded data, which some clients get wrong in various ways, and the number of ways to get it wrong is very large :( But I don't see any test for a fractional number of characters, and that may be an excellent test for finding garbage lines. Thanks for the idea.
[Prev in Thread] | Current Thread | [Next in Thread] |