commit 6bf8a3e: [Minor] Check for NULL pointer
Vsevolod Stakhov
vsevolod at highsecure.ru
Sat Dec 25 20:35:06 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-12-25 20:22:18 +0000
URL: https://github.com/rspamd/rspamd/commit/6bf8a3e898ea5a307b9492f5298bf17f3520d9ed (HEAD -> master)
[Minor] Check for NULL pointer
---
src/libmime/mime_headers.c | 4 ++++
1 file changed, 4 insertions(+)
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;
More information about the Commits
mailing list