From: Vsevolod Stakhov Date: Fri, 15 Jul 2022 21:26:54 +0000 (+0100) Subject: [Minor] Try to fix unpadded base32 decoding X-Git-Tag: 3.3~130 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ca32640e2372f97314dc65e9b40af718588753d6;p=rspamd.git [Minor] Try to fix unpadded base32 decoding --- diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index 81679c2e6..849d11a4f 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -1008,7 +1008,7 @@ rspamd_decode_base32_buf (const gchar *in, gsize inlen, guchar *out, gsize outle } } - if (processed_bits > 0 && o < end) { + if (processed_bits > 0 && o < end && acc != 0) { *o++ = (acc & 0xFF); } else if (o > end) {