diff options
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r-- | src/libmime/mime_encoding.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c index edbee1a30..a3467fc91 100644 --- a/src/libmime/mime_encoding.c +++ b/src/libmime/mime_encoding.c @@ -638,14 +638,14 @@ rspamd_mime_charset_find_by_content_maybe_split (const gchar *in, gsize inlen) RSPAMD_CHARSET_MAX_CONTENT, false); /* 7bit stuff */ - if (strcmp (c1, "US-ASCII") == 0) { + if (c1 && strcmp (c1, "US-ASCII") == 0) { c1 = NULL; /* Invalid - we have 8 bit there */ } - if (strcmp (c2, "US-ASCII") == 0) { + if (c2 && strcmp (c2, "US-ASCII") == 0) { c2 = NULL; /* Invalid - we have 8 bit there */ } - if (strcmp (c3, "US-ASCII") == 0) { - c2 = NULL; /* Invalid - we have 8 bit there */ + if (c3 && strcmp (c3, "US-ASCII") == 0) { + c3 = NULL; /* Invalid - we have 8 bit there */ } if (!c1) { |