[PATCH v2 1/4] dhcp6c: decode_base64()

Denys Vlasenko vda.linux at googlemail.com
Fri Oct 28 12:05:02 UTC 2011


On Sun, Oct 23, 2011 at 1:12 PM, Leonid Lisovskiy <lly.dev at gmail.com> wrote:
> On Tue, Oct 18, 2011 at 2:19 PM, Denys Vlasenko
> <vda.linux at googlemail.com> wrote:
>> After you created decode_base64 which operates on string,
>> rewrite read_base64 to use it (say, by loop "read up to N*4 bytes,
>> decode them, repeat if no decode error, no EOF and no end char
>> encountered").
>>
>> This may need some tweaks: decode_base64 should be taught
>> how to decode partial (incomplete) base64 string.
>
> I prepare suggested variant, please take a look on patch attached, but
> it has worse code size (+28 bytes) than copy-n-paste :((
> Will try to optimize it, but currently have no good ideas...

It also fails to decode data which decodes to NUL bytes.

I fixed it and and committed to git. Thanks.
-- 
vda


More information about the busybox mailing list