From b38d399811a556b07a088ec05b947e56397e557b Mon Sep 17 00:00:00 2001 From: dequis Date: Mon, 24 Nov 2014 02:16:09 -0300 Subject: Use glib functions for base64 decoding/encoding This fixes several coverity warnings about 'tainted data index sink' and a fixme about thread safety in the old base64_decode implementation. Had to adapt the code that used base64_encode_real: - oauth.c: different character set order, but it's for the nonce so it doesn't matter - libyahoo2.c: used as part of the auth, changes "+/=" into "._-". Fixed by encoding first the usual way through glib, then replacing. --- lib/base64.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/base64.h') diff --git a/lib/base64.h b/lib/base64.h index ebd74bf1..dc199c55 100644 --- a/lib/base64.h +++ b/lib/base64.h @@ -27,7 +27,5 @@ G_MODULE_EXPORT char *tobase64( const char *text ); G_MODULE_EXPORT char *base64_encode( const unsigned char *in, int len ); -G_MODULE_EXPORT int base64_encode_real( const unsigned char *in, int inlen, unsigned char *out, const char *b64digits ); G_MODULE_EXPORT char *frombase64( const char *in ); G_MODULE_EXPORT int base64_decode( const char *in, unsigned char **out ); -G_MODULE_EXPORT int base64_decode_real( const unsigned char *in, unsigned char *out, char *b64reverse ); -- cgit v1.2.3