diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-13 13:45:32 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-04-13 13:45:32 +0100 |
commit | 125664ba6cf0154c65691441a9fb3b9dc120336d (patch) | |
tree | 9d9c7fccf6c0908b875cef222f8af1ad59d2ffe7 /src/libmime/mime_headers.c | |
parent | ec5db547fe2bdbbe4d89661eee082ee3e509f63e (diff) | |
download | rspamd-125664ba6cf0154c65691441a9fb3b9dc120336d.tar.gz rspamd-125664ba6cf0154c65691441a9fb3b9dc120336d.zip |
[Minor] Add safety checks when decoding CT attributes
Diffstat (limited to 'src/libmime/mime_headers.c')
-rw-r--r-- | src/libmime/mime_headers.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index 4d2c89dae..9dc336cf7 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -1911,6 +1911,10 @@ rspamd_message_set_modified_header (struct rspamd_task *task, raw_value = ucl_object_tolstring (value, &raw_len); + if (raw_len == 0) { + continue; + } + struct rspamd_mime_header *nhdr = rspamd_mempool_alloc0 ( task->task_pool, sizeof (*nhdr)); |