diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-09 23:44:28 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-09 23:44:28 +0000 |
commit | 7bbf934bd25b81aee2d87679cb48d4fae5202706 (patch) | |
tree | 6a253533eb66b1aef293554b20ebe194e375a8b5 | |
parent | badd07703cdc03ca5ac003761a6f0dcc19cac7b4 (diff) | |
download | rspamd-7bbf934bd25b81aee2d87679cb48d4fae5202706.tar.gz rspamd-7bbf934bd25b81aee2d87679cb48d4fae5202706.zip |
Fix allocated_len calculation found by fuzz testing.
-rw-r--r-- | src/libutil/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/util.c b/src/libutil/util.c index 2a64b9c10..4a125c560 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2203,7 +2203,7 @@ rspamd_decode_base32 (const gchar *in, gsize inlen, gsize *outlen) guchar c; guint acc = 0U; guint processed_bits = 0; - gsize olen = 0, i, allocated_len = inlen / 8 * 5 + 2; + gsize olen = 0, i, allocated_len = inlen * 5 / 8 + 2; res = g_malloc (allocated_len); |