diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-22 18:43:34 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-07-22 18:43:34 +0200 |
commit | 61cd8387850ee834a7779da942819f347bcff5e3 (patch) | |
tree | b4359a2ad48feaa018a752e2c9da9a8fbdfd4031 /mshow.c | |
parent | c8d5dd296a7331609566cd4a55962f834bc70aaa (diff) | |
download | mblaze-61cd8387850ee834a7779da942819f347bcff5e3.tar.gz mblaze-61cd8387850ee834a7779da942819f347bcff5e3.tar.xz mblaze-61cd8387850ee834a7779da942819f347bcff5e3.zip |
mshow: don't crash on missing Content-Type (consider it text/plain)
Diffstat (limited to 'mshow.c')
-rw-r--r-- | mshow.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mshow.c b/mshow.c index f5d9cac..3684faf 100644 --- a/mshow.c +++ b/mshow.c @@ -234,7 +234,7 @@ reply_mime(int depth, struct message *msg, char *body, size_t bodylen) char *mt = mimetype(ct); char *tlmt = tlmimetype(ct); - if (strncmp(ct, "text/plain", 10) == 0) { + if (!ct || strncmp(ct, "text/plain", 10) == 0) { char *charset = 0, *cs, *cse; if (blaze822_mime_parameter(ct, "charset", &cs, &cse)) charset = strndup(cs, cse-cs); |