]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Add sanity check for base32 decoding
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 10 Apr 2020 10:44:25 +0000 (11:44 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 10 Apr 2020 10:44:46 +0000 (11:44 +0100)
src/libutil/str_util.c

index b2c50cab7d7730fd66cb1e082f4f569f2b45b9c0..882ac55658dee2ca799e4c0dfb99ea626c04beda 100644 (file)
@@ -845,6 +845,10 @@ rspamd_decode_base32 (const gchar *in, gsize inlen, gsize *outlen,
        else {
                g_free (res);
 
+               if (outlen) {
+                       *outlen = 0;
+               }
+
                return NULL;
        }