Wireshark-dev: Re: [Wireshark-dev] epan_base64_decode(): failure when string contains a NUL cha
From: Evan Huus <[email protected]>
Date: Wed, 17 Apr 2013 17:14:07 -0400
Glib has g_base64_decode_inplace as of 2.20 so you could try using
that. We support way back to 2.14 at the moment so we keep
epan_base64_decode() available, but if the glib function works it's
probably a bug in our code.

Evan

On Wed, Apr 17, 2013 at 4:27 PM, Uli Heilmeier <[email protected]> wrote:
> Hello list,
>
> I'm currently trying to improve the SMTP dissector regarding the AUTH command.
> Up to now I finished the 'AUTH LOGIN' mechanism (s. Bug 8591). Next I
> would like to decode the 'AUTH PLAIN' mechanism (RFC 4616).
>
> With the PLAIN mechanism the packet has a base64 encoded string containing:
> [authorization user](\x00)[authentication user](\x00)[password]
>
> For example:
> dGVzdAB0ZXN0ADEyMzQ= contains test(NUL)test(NUL)1234
>
> I tried to decode the base64 string with the epan_base64_decode() function
> (from epan/base64.h). Unfortunately this fails. I only get a wrong three
> bytes long string.
> I guess the problem is the NUL character as a delimiter.
>
> Do you have an idea if this is bug in the epan_base64_decode() function or
> do I have to do the decoding another way?
>
>
> Thanks a lot!
> Sincerely
> Uli
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <[email protected]>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>              mailto:[email protected]?subject=unsubscribe