diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-25 20:22:18 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-12-25 20:33:55 +0000 |
commit | 6bf8a3e898ea5a307b9492f5298bf17f3520d9ed (patch) | |
tree | 0e1f3309ba9d29766b0e660b94d964a0ad7fd6b4 /src/libmime/mime_headers.c | |
parent | 2d8c7bfb4e011bdcd4a632061e0f759abccff40a (diff) | |
download | rspamd-6bf8a3e898ea5a307b9492f5298bf17f3520d9ed.tar.gz rspamd-6bf8a3e898ea5a307b9492f5298bf17f3520d9ed.zip |
[Minor] Check for NULL pointer
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 76ae1770a..b819f0ec5 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -907,6 +907,10 @@ rspamd_message_get_header_from_hash (struct rspamd_mime_headers_table *hdrs, const gchar *field, gboolean need_modified) { + if (hdrs == NULL) { + return NULL; + } + khiter_t k; khash_t(rspamd_mime_headers_htb) *htb = &hdrs->htb; struct rspamd_mime_header *hdr; |