Leah Neukirchen
3ebd4cc3a3
mlist: list: update total count too
7 years ago
Leah Neukirchen
6310898b10
mshow: list, reply: skip leading spaces for file names
7 years ago
Leah Neukirchen
4fef01ab6d
rfc2047: blaze822_decode_rfc2047: check for NUL bytes at the very end of decoding
7 years ago
Leah Neukirchen
ba4a0cf589
rfc2047: blaze822_decode_rfc2047: don't decode encoded-words that contain NUL bytes
...
This is a lax interpretation of RFC 2047, 4.5:
> Only printable and white space character data should be encoded using
> this scheme. However, since these encoding schemes allow the
> encoding of arbitrary octet values, mail readers that implement this
> decoding should also ensure that display of the decoded data on the
> recipient's terminal will not cause unwanted side-effects.
Since many of the code that deals with header values does not support
inline NUL bytes, it's best to not decode them here.
We check for this after iconv, so quoted-printable UTF-32 e.g. should be
safe.
Also see https://www.mailsploit.com/
7 years ago
Leah Neukirchen
4d40475364
mscan: fetch window size from /dev/tty
...
Fixes mscan width inside mless.
7 years ago
Leah Neukirchen
3e6f8047a6
u8decode: detect invalid encodings
7 years ago
Leah Neukirchen
73641367db
revamp utf-8 handling code
7 years ago
Duncaen
8b50a794b0
magrep: keep threading while matching body
7 years ago
Leah Neukirchen
bb15eac90f
GNUmakefile: prefer CFLAGS from env, move hardening to overridable default flags
7 years ago
Duncaen
a604469303
t: add test case for latest magrep crash
...
This crash was reported in #76 and resolved with
commit 6239ef35357824308df079bd6df0dc4b202e898.
7 years ago
Leah Neukirchen
e6239ef353
rfc2047: blaze822_decide_rfc2047: ensure enough space for NUL-termination
...
Closes #76 .
7 years ago
Leah Neukirchen
d46f65d38c
mflow: flowed: ensure progress by printing at least one word each time
...
Even if this overflows the line length...
7 years ago
Leah Neukirchen
c1fcb246bb
mflow: flowed: reevaluate termination after line break.
7 years ago
Leah Neukirchen
5131b4305f
mscan: display TO: address decode
7 years ago
Leah Neukirchen
00a1382175
mlist: use a static buffer, clean up control flow
7 years ago
Duncaen
4e7a5c5ab6
mpick: add negations
7 years ago
Leah Neukirchen
6a074d7451
mmsg.7: consistently speak of sequences and ranges
7 years ago
Leah Neukirchen
06c9f23365
mshow: use %ld for longs
7 years ago
Leah Neukirchen
be6bbf6056
blaze822: blaze822_addr: ensure strlen is not run on null pointer
...
Found by Larry Hynes.
7 years ago
Leah Neukirchen
5fe0003c98
mscan: revert width to int
7 years ago
Leah Neukirchen
88bde0af33
mshow: render_mime: fix logic bug
7 years ago
Leah Neukirchen
1748c0f52a
mhdr: do not return void values
7 years ago
Leah Neukirchen
5f45b7d533
use appropriate integer types
...
Mainly found with clang -Wconversion -Wshorten-64-to-32.
7 years ago
Leah Neukirchen
ce9ac3aff4
blaze822: blaze822_addr: quote local-part if needed
7 years ago
Leah Neukirchen
5ff71ace36
rfc2047: blaze822_decode_qp: decode invalid qp-codes as literal
7 years ago
Leah Neukirchen
f1789cfcef
mshow: add -F to disable MIME filters
7 years ago
Leah Neukirchen
75ba2ab9a5
mcom: automatically run mmime when deemed necessary
7 years ago
Leah Neukirchen
d4cbac0aa5
mmime: gen_qp: quote ^From and ^.$ to be safe
7 years ago
Leah Neukirchen
54435b30b6
mmime: gen_qp: encode trailing space and tab as =20/=09
...
See RFC2045 6.7.(3):
> It follows that an octet with decimal value 9 or 32 appearing at the
> end of an encoded line must be represented according to Rule #1 .
Prefer this over generating a soft-line break and then a real line break.
7 years ago
Leah Neukirchen
7e9a73397b
mflow: only accept flowed line with final space when reflowing
7 years ago
Leah Neukirchen
6557dec05b
GNUmakefile: fix OpenBSD build
...
By sunil@nimmagadda.net .
7 years ago
Leah Neukirchen
3ebe373309
GNUmakefile: tweaks to make it easier for OpenBSD ports
7 years ago
Leah Neukirchen
a674be611c
mflow: fix argument parsing
7 years ago
Leah Neukirchen
35181baf32
mflow: only space stuff when really reflowing
7 years ago
Leah Neukirchen
ebeaf43a27
mflow: add wrapping of long lines, add argument parsing, add quoting
7 years ago
Leah Neukirchen
285671f0e2
mshow: show: treat non-mime mails as single-part text/plain mails
7 years ago
Leah Neukirchen
34066eec64
contrib: add mrecode
7 years ago
Leah Neukirchen
98924a7fa1
mhdr: add -p to extract MIME parameters
7 years ago
Leah Neukirchen
3a67663a5d
mflow: assume no reflow by default, when content-type exists
7 years ago
Leah Neukirchen
7c1c2c3740
mflow: flowed: add case where the word is too long for a line
7 years ago
Leah Neukirchen
3bfd9319e9
mflag: fix behavior with no arguments and reading from not a tty
7 years ago
Leah Neukirchen
66d0eff12f
style
7 years ago
Sören Tempel
dfe09a7c5e
mquote: make sed expression to strip signature work with busybox sed
...
Closes : #74 [via git-merge-pr]
7 years ago
Leah Neukirchen
6f99ef55a8
mgenmid: printb36: fix off-by-one
...
Closes #73 .
7 years ago
Leah Neukirchen
4e13b73245
mshow: render_mime: avoid indexing into empty buffer
...
Found using spam corpus at http://untroubled.org/spam/2017-08.7z
7 years ago
Leah Neukirchen
6948b408a2
mflow: use blaze822_mime_parameter properly
...
Found using spam corpus at http://untroubled.org/spam/2017-08.7z .
7 years ago
Leah Neukirchen
d65041c386
squash more mandoc -Tlint warnings
7 years ago
Leah Neukirchen
4edca0ec3a
mshow: use return value 62 for raw output of filters
...
E.g. for elinks -dump -dump-color-mode 3
7 years ago
Leah Neukirchen
6718576b9f
mmime.1: reference makemime(1) and mhbuild(1)
7 years ago
Leah Neukirchen
cf4bc05010
mshow: use "less -RFXe" when $PAGER is plain "less"
7 years ago