summaryrefslogtreecommitdiffstats
path: root/src/libmime/mime_encoding.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-18 12:56:46 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-09-18 12:56:46 +0100
commit907cc2eb616124abe41e7c1b525139a54f3cea8f (patch)
tree1b8327db28fb620acf1dbbedf46c7bac71fbad98 /src/libmime/mime_encoding.c
parent4041c2d64024f27488461e03fcd587dfbb34c4b0 (diff)
downloadrspamd-907cc2eb616124abe41e7c1b525139a54f3cea8f.tar.gz
rspamd-907cc2eb616124abe41e7c1b525139a54f3cea8f.zip
[Minor] Fix more issues in libmime
Found by: coverity scan
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r--src/libmime/mime_encoding.c8
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) {