base64 bug handling \r characters

[email protected]
Newsgroups gmane.mail.exmh.devel
Message-ID <[email protected]>
Tried to send out a PDF, and it got horribly mangled by the
base64 encoding.

The original file:

%  od -cx CIS/CIS-AIX-draft-09232004.pdf | head -6
0000000   %   P   D   F   -   1   .   4  \r  \n   %   ä   ö   Ü   ß  \r
        5025 4644 312d 342e 0a0d e425 dcf6 0ddf
0000020  \n   1       0       o   b   j  \r  \n   <   <       /   L   e
        310a 3020 6f20 6a62 0a0d 3c3c 2f20 654c
0000040   n   g   t   h       2       0       R  \r  \n               /
        676e 6874 3220 3020 5220 0a0d 2020 2f20

What results from decoding the resulting base64:

% od -cx CIS-AIX-draft-09232004.pdf | head -6
0000000   %   P   D   F   -   1   .   4  \n   %   ä   ö   Ü   ß  \n   1
        5025 4644 312d 342e 250a f6e4 dfdc 310a
0000020       0       o   b   j  \n   <   <       /   L   e   n   g   t
        3020 6f20 6a62 3c0a 203c 4c2f 6e65 7467
0000040   h       2       0       R  \n               /   F   i   l   t
        2068 2032 2030 0a52 2020 2f20 6946 746c

My gut instinct is to say it's some odd quoting issue in
Base64_EncodeBlock - my brain hurts trying to follow what
happens to $c and $old and $x if we're looking at whitespace.

_______________________________________________
Exmh-workers mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/exmh-workers
signature.asc (application/pgp-signature, 226 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Exmh version 2.5 07/13/2001

iD8DBQFBUxvdcC3lWbTT17ARAiw+AKDhLX8E6pc5myDKRJOUxrefnPHP/gCgyZ9e
zaUrmyaX1sIZIbeQKWQQI1Q=
=c9Ic
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.