commit 6abb046: [Minor] Core: Fix one more issue in content_type_has_param

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Dec 27 18:28:12 UTC 2018


Author: Vsevolod Stakhov
Date: 2018-12-20 09:19:31 +0000
URL: https://github.com/rspamd/rspamd/commit/6abb04609d54b45ba7ac285061acdeb122ad0b4c

[Minor] Core: Fix one more issue in content_type_has_param

---
 src/libmime/mime_expressions.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index 3ab8cee32..17a42a128 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -1792,12 +1792,16 @@ rspamd_content_type_has_param (struct rspamd_task * task,
 		RSPAMD_FTOK_FROM_STR (&lit, "charset");
 
 		if (rspamd_ftok_equal (&srch, &lit)) {
-			return cur_part->ct->charset.len > 0;
+			if (cur_part->ct->charset.len > 0) {
+				return TRUE;
+			}
 		}
 
 		RSPAMD_FTOK_FROM_STR (&lit, "boundary");
 		if (rspamd_ftok_equal (&srch, &lit)) {
-			return cur_part->ct->orig_boundary.len > 0;
+			if (cur_part->ct->boundary.len > 0) {
+				return TRUE;
+			}
 		}
 
 		if (cur_part->ct->attrs) {


More information about the Commits mailing list