]> source.dussan.org Git - rspamd.git/commitdiff
Fix unfolded base64 encoding
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Nov 2015 00:34:30 +0000 (00:34 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 11 Nov 2015 00:34:30 +0000 (00:34 +0000)
src/libutil/str_util.c

index 8254aa2ad995738348f7e49be05c2a0631bf4e87..c4b0ea1738257cdf398f96364f974d1ea4b180b0 100644 (file)
@@ -624,7 +624,7 @@ rspamd_encode_base64_common (const guchar *in, gsize inlen, gint str_len,
        } } \
 while (0)
 
-       gsize allocated_len = (inlen / 3) * 4 + 4;
+       gsize allocated_len = (inlen / 3) * 4 + 5;
        gchar *out, *o;
        guint64 n;
        guint32 rem, t, carry;