On Tue, 2006-12-05 at 10:02 +0100, Michele Baldessari wrote:
> The previous version had "inlen != 2" test which doesn't really make
> much sense since we are checking the two next characters, so we need to
> guarantee their presence.

Correct, I made a typo there.

> I also added a second check for trailing of 
> single '\r' and '\n' only, which was why it was barfing on my testcase
> with sasl-simple-client.

Good to see that you came to the same conclusion independently! :)

My patch has all the checks in one if clause, so it doesn't duplicate
the check for saw_equal. It also catches the case where inlen is not 1
or 2 after the > 0 check -- it could be 3 after the decoding while loop
(the while condition is inlen > 3) in which case it's either a
protocol / alignment error or a partial base64 block. Perhaps it's also
a little bit easier to understand since all conditions are positive.
Other than these differences, your patch seems to be equivalent.

Yours is prettier, though, but I'm afraid that's secondary. :)

If you see any mistakes in my patch, then please yell! An upload will be
made within a day or two.

Cheers,
-- 
Fabian Fagerholm <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to