Wireshark mailing list archives

epan_base64_decode(): failure when string contains a NUL character


From: Uli Heilmeier <zeugs () heilmeier eu>
Date: Wed, 17 Apr 2013 22:27:42 +0200

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 <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: