diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-04-10 11:44:25 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-04-10 11:44:46 +0100 |
commit | f943c725865cd70859efb765ce643434d87e3ff9 (patch) | |
tree | b2d979978211e662fc234cda734050a18f4f575b | |
parent | f8072344f9fb3fbc1ac93122f6cad11204c8cbf2 (diff) | |
download | rspamd-f943c725865cd70859efb765ce643434d87e3ff9.tar.gz rspamd-f943c725865cd70859efb765ce643434d87e3ff9.zip |
[Minor] Add sanity check for base32 decoding
-rw-r--r-- | src/libutil/str_util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/str_util.c b/src/libutil/str_util.c index b2c50cab7..882ac5565 100644 --- a/src/libutil/str_util.c +++ b/src/libutil/str_util.c @@ -845,6 +845,10 @@ rspamd_decode_base32 (const gchar *in, gsize inlen, gsize *outlen, else { g_free (res); + if (outlen) { + *outlen = 0; + } + return NULL; } |