commit f943c72: [Minor] Add sanity check for base32 decoding

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Apr 10 10:49:08 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-04-10 11:44:25 +0100
URL: https://github.com/rspamd/rspamd/commit/f943c725865cd70859efb765ce643434d87e3ff9 (HEAD -> master)

[Minor] Add sanity check for base32 decoding

---
 src/libutil/str_util.c | 4 ++++
 1 file changed, 4 insertions(+)

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;
 	}
 


More information about the Commits mailing list