Open GoogleCodeExporter opened 9 years ago
I think I know what is going on here. naim expects there to be a trailing NULL
in the Base64 stream *after* the length'ed bits -- or otherwise, for the number
of bytes to require Base64 padding. If we look at the Base64 data:
joshua@escape:~$ openssl base64 -d | hexdump -C
ABNJIHdhbnQgcGFuY2FrZXMgT19v
00000000 00 13 49 20 77 61 6e 74 20 70 61 6e 63 61 6b 65 |..I want pancake|
00000010 73 20 4f 5f 6f |s O_o|
00000015
then we'll note that the length is correct, but there's no trailing null.
firetalk_debase64 does successfully add a null, passing the check on line 1811
(s[len+2] == 0), but there's no extra null at the end.
I think there should be no adverse behavioral change from removing the assert
for s[len+3]. I will create a patch for this shortly.
Original comment by joshua.a...@gmail.com
on 12 Jul 2011 at 6:37
Original issue reported on code.google.com by
goo...@gushi.org
on 12 Jul 2011 at 6:31