]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Check for NULL pointer
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 25 Dec 2021 20:22:18 +0000 (20:22 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 25 Dec 2021 20:33:55 +0000 (20:33 +0000)
src/libmime/mime_headers.c

index 76ae1770a82333b0b6569c782af82a779b8a8d33..b819f0ec55b266c35783ad5328ae39b381815cf0 100644 (file)
@@ -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;