#include <ctype.h>
#include "codeconv.h"
-#include "base64.h"
#include "quoted-printable.h"
#define ENCODED_WORD_BEGIN "=?"
encoding = g_ascii_toupper(*(encoding_begin_p + 1));
if (encoding == 'B') {
- decoded_text = g_malloc
- (eword_end_p - (text_begin_p + 1) + 1);
- len = base64_decode(decoded_text, text_begin_p + 1,
- eword_end_p - (text_begin_p + 1));
- decoded_text[len] = '\0';
+ gchar *tmp;
+ tmp = g_strndup(text_begin_p + 1, eword_end_p - (text_begin_p + 1) + 1);
+ decoded_text = g_base64_decode_zero(tmp, &out_len);
+ g_free(tmp);
} else if (encoding == 'Q') {
decoded_text = g_malloc
(eword_end_p - (text_begin_p + 1) + 1);