diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-07-15 22:26:54 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-07-15 22:27:50 +0100 |
commit | ca32640e2372f97314dc65e9b40af718588753d6 (patch) | |
tree | 33c54fdedb94cfb5e1059e96fdba2b116166a323 /src/libutil | |
parent | 1aef384f621fee76c72dce0f1d18e825ee7b46fb (diff) | |
download | rspamd-ca32640e2372f97314dc65e9b40af718588753d6.tar.gz rspamd-ca32640e2372f97314dc65e9b40af718588753d6.zip |
[Minor] Try to fix unpadded base32 decoding
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/str_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) { |