]> granicus.if.org Git - neomutt/log
neomutt
6 years agoUse our base64 API instead of duplicating the decoding algorithm
Pietro Cerutti [Fri, 19 Jan 2018 12:24:59 +0000 (12:24 +0000)]
Use our base64 API instead of duplicating the decoding algorithm

Also, fix a memory leak while at it.

Issue #1015

6 years agomove rfc2047 functions to library
Pietro Cerutti [Fri, 12 Jan 2018 16:10:37 +0000 (16:10 +0000)]
move rfc2047 functions to library

6 years agoHandle RFC2047 words split in the middle of a multibyte character
Pietro Cerutti [Fri, 12 Jan 2018 16:10:37 +0000 (16:10 +0000)]
Handle RFC2047 words split in the middle of a multibyte character

6 years agofix for pgpewrap in default gpg.rc (#1023)
Benjamin Mako Hill [Fri, 19 Jan 2018 08:20:54 +0000 (00:20 -0800)]
fix for pgpewrap in default gpg.rc (#1023)

Fixes an bug introduced by changes intorduced in commit
465fad6d21ac3b9d2ae5d12bae7705f5f04323e7 to contrib/gpg.rc that breaks signed
and encrypted mail. The issues is just a typo related to way that pgpewrap
works. This should fix issue #998.

6 years agomerge: light refactoring
Richard Russon [Thu, 18 Jan 2018 23:32:28 +0000 (23:32 +0000)]
merge: light refactoring

 * move unsigned atoi functions
 * comparison ordering
 * braces
 * move functions to library

6 years agomove functions to library
Richard Russon [Thu, 18 Jan 2018 11:13:04 +0000 (11:13 +0000)]
move functions to library

6 years agobraces
Richard Russon [Wed, 17 Jan 2018 23:22:39 +0000 (23:22 +0000)]
braces

6 years agocomparison ordering
Richard Russon [Wed, 17 Jan 2018 18:41:30 +0000 (18:41 +0000)]
comparison ordering

6 years agomove unsigned atoi functions
Richard Russon [Wed, 17 Jan 2018 18:21:22 +0000 (18:21 +0000)]
move unsigned atoi functions

6 years agoFix a couple memory leaks in pattern.c
Kevin McCarthy [Thu, 18 Jan 2018 02:57:49 +0000 (18:57 -0800)]
Fix a couple memory leaks in pattern.c

BUFFER.data was not being freed in a couple cases.

The pattern and simple search were not being freed if imap_search()
failed.

6 years agomerge: fix coverity defects
Richard Russon [Thu, 18 Jan 2018 23:29:20 +0000 (23:29 +0000)]
merge: fix coverity defects

 * drop unreachable condition
 * set new regex
 * negative check
 * check size_t value
 * unused result
 * ptr checks
 * negative index
 * tidy logic
 * fix logic
 * unchecked returns
 * forward null checks

6 years agoforward null checks
Richard Russon [Wed, 17 Jan 2018 16:06:07 +0000 (16:06 +0000)]
forward null checks

6 years agounchecked returns
Richard Russon [Wed, 17 Jan 2018 15:47:32 +0000 (15:47 +0000)]
unchecked returns

6 years agofix logic
Richard Russon [Wed, 17 Jan 2018 15:23:07 +0000 (15:23 +0000)]
fix logic

6 years agotidy logic
Richard Russon [Wed, 17 Jan 2018 15:13:25 +0000 (15:13 +0000)]
tidy logic

6 years agonegative index
Richard Russon [Wed, 17 Jan 2018 15:06:21 +0000 (15:06 +0000)]
negative index

6 years agoptr checks
Richard Russon [Wed, 17 Jan 2018 15:04:17 +0000 (15:04 +0000)]
ptr checks

6 years agounused result
Richard Russon [Wed, 17 Jan 2018 14:52:17 +0000 (14:52 +0000)]
unused result

add new var for calc

6 years agocheck size_t value
Richard Russon [Wed, 17 Jan 2018 14:33:51 +0000 (14:33 +0000)]
check size_t value

6 years agonegative check
Richard Russon [Wed, 17 Jan 2018 13:46:43 +0000 (13:46 +0000)]
negative check

6 years agoset new regex
Richard Russon [Wed, 17 Jan 2018 13:30:47 +0000 (13:30 +0000)]
set new regex

6 years agodrop unreachable condition
Richard Russon [Wed, 17 Jan 2018 13:12:03 +0000 (13:12 +0000)]
drop unreachable condition

6 years agoSimplify ALL_FILES definition, make it easier to add/remove files
Pietro Cerutti [Thu, 18 Jan 2018 14:52:46 +0000 (14:52 +0000)]
Simplify ALL_FILES definition, make it easier to add/remove files

6 years agomerge: trivial improvements
Richard Russon [Wed, 17 Jan 2018 00:39:40 +0000 (00:39 +0000)]
merge: trivial improvements

 * rename parameters bufsz -> buflen
 * tidy mapping functions
 * move mutt_pretty_size to libmutt
 * iwyu: remove unnecessary headers
 * rename charset functions
 * mutt_str_getenv()
 * use mutt_str_getenv()

6 years agouse mutt_str_getenv()
Richard Russon [Wed, 10 Jan 2018 16:25:31 +0000 (16:25 +0000)]
use mutt_str_getenv()

6 years agomutt_str_getenv()
Richard Russon [Wed, 10 Jan 2018 15:49:44 +0000 (15:49 +0000)]
mutt_str_getenv()

6 years agorename charset functions
Richard Russon [Wed, 10 Jan 2018 00:53:11 +0000 (00:53 +0000)]
rename charset functions

To avoid a clash with the configset functions to come.

6 years agoiwyu: remove unnecessary headers
Richard Russon [Tue, 9 Jan 2018 19:44:45 +0000 (19:44 +0000)]
iwyu: remove unnecessary headers

6 years agomove mutt_pretty_size to libmutt
Richard Russon [Thu, 4 Jan 2018 19:13:27 +0000 (19:13 +0000)]
move mutt_pretty_size to libmutt

6 years agotidy mapping functions
Richard Russon [Thu, 4 Jan 2018 12:50:28 +0000 (12:50 +0000)]
tidy mapping functions

6 years agorename parameters bufsz -> buflen
Richard Russon [Mon, 1 Jan 2018 18:04:06 +0000 (18:04 +0000)]
rename parameters bufsz -> buflen

6 years agolua: enable myvars
Richard Russon [Fri, 29 Dec 2017 01:16:23 +0000 (01:16 +0000)]
lua: enable myvars

Fixes #1016
Fixes #1017

6 years agomerge: upstream fixes (mutt/default)
Richard Russon [Tue, 16 Jan 2018 23:59:16 +0000 (23:59 +0000)]
merge: upstream fixes (mutt/default)

 * Fix improper signed int conversion of IMAP uid and msn values.
 * Change imap literal counts to parse and store unsigned ints.
 * Fix imap status count range check.
 * cmd_handle_fatal: make error message a bit more descriptive
 * Updated French translation.
 * Create pgp and s/mime default and sign_as key vars. (see #3983)
 * Add missing setup calls when resuming encrypted drafts.
 * mutt_pretty_size: show real number for small files
 * examine_directory: set directory/symlink size to zero
 * Update pl.po
 * Fixed GPGME translations that weren’t shown but affected the keyboard
 * docs: update encrypt-to-self
 * Update smime.rc: Typo fix, consistent headings
 * Add pgp_default_key and smime_sign_as info to contrib rc files.
 * Split Copyright and Thanks in help output.
 * strip out copyright translations

6 years agostrip out copyright translations
Richard Russon [Tue, 16 Jan 2018 23:21:15 +0000 (23:21 +0000)]
strip out copyright translations

6 years agoSplit Copyright and Thanks in help output.
Olaf Hering [Tue, 16 Jan 2018 08:40:06 +0000 (09:40 +0100)]
Split Copyright and Thanks in help output.

The Copyright string is changing often, and its content is obvious.
It does not need translation. The remaining string can be translated.
This change avoids a stale translation once one of the years change.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
6 years agoAdd pgp_default_key and smime_sign_as info to contrib rc files.
Kevin McCarthy [Tue, 16 Jan 2018 00:06:30 +0000 (16:06 -0800)]
Add pgp_default_key and smime_sign_as info to contrib rc files.

Explain $pgp_default_key vs $pgp_sign_as in gpg.rc.

Explain $smime_default_key vs $smime_sign_as in smime.rc.

6 years agoUpdate smime.rc: Typo fix, consistent headings
Konstantin Stephan [Mon, 15 Jan 2018 14:43:53 +0000 (14:43 +0000)]
Update smime.rc: Typo fix, consistent headings

6 years agodocs: update encrypt-to-self
Richard Russon [Mon, 15 Jan 2018 01:40:56 +0000 (01:40 +0000)]
docs: update encrypt-to-self

6 years agoFixed GPGME translations that weren’t shown but affected the keyboard
Grzegorz Szymaszek [Sat, 13 Jan 2018 20:21:35 +0000 (21:21 +0100)]
Fixed GPGME translations that weren’t shown but affected the keyboard

6 years agoUpdate pl.po
Grzegorz Szymaszek [Sat, 13 Jan 2018 19:27:11 +0000 (20:27 +0100)]
Update pl.po

6 years agoexamine_directory: set directory/symlink size to zero
Olaf Hering [Tue, 3 Dec 2013 15:42:39 +0000 (16:42 +0100)]
examine_directory: set directory/symlink size to zero

The size of a directory or symlink in the folder browser is not meaningful.
For directories it means just how many blocks were allocated to hold all
entries. It does not mean that the entries are still present in the directory.
For symlinks its the size of the target.
Set both to zero to simplify the folder browser output.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
6 years agomutt_pretty_size: show real number for small files
Olaf Hering [Tue, 3 Dec 2013 15:43:49 +0000 (16:43 +0100)]
mutt_pretty_size: show real number for small files

If a file is smaller than a certain size it is unfriendly to print 0K or
0,1K as number of mails or as file size. Instead use the real number.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
6 years agoAdd missing setup calls when resuming encrypted drafts.
Kevin McCarthy [Thu, 11 Jan 2018 23:08:30 +0000 (15:08 -0800)]
Add missing setup calls when resuming encrypted drafts.

Calls to get the passphrase were missing for app/pgp and app/smime.
App/smime was also missing a call to crypt_smime_getkeys().

If a failure occurs, report it back, rather than just continuing.
Otherwise, postponed messages could be completely lost.

6 years agoCreate pgp and s/mime default and sign_as key vars. (see #3983)
Kevin McCarthy [Thu, 11 Jan 2018 21:24:30 +0000 (13:24 -0800)]
Create pgp and s/mime default and sign_as key vars. (see #3983)

The $postpone_encrypt and $(pgp/smime)_self_encrypt configuration
variables have created a somewhat messier situation for users.  Many
of them now have to specify their keys across multiple configuration
variables.

(Trac) Ticket #3983 had a reasonable request: "if my encrypt and
signing keys are the same, why can't I just specify my key once in my
.muttrc?"

The problem currently is that $smime_default_key and $pgp_sign_as are
both used to specify signing keys, and are set by the "sign (a)s"
security menu choice.  So we can't store encryption keys there because
some users have separate sign-only capability keys.

Create $pgp_default_key to store the default encryption key.  Change
signing to use $pgp_default_key, unless overridden by $pgp_sign_as.
The pgp "sign (a)s" will continue setting $pgp_sign_as.

Create $smime_sign_as.  Change signing to use $smime_default_key
unless overridden by $smime_sign_as.  Change s/mime "sign (a)s" menu
to set $smime_sign_as instead.

Change $postpone_encrypt and $(pgp/smime)_self_encrypt to use
$(pgp/smime)_default_key by default.

Mark $(pgp/smime)_self_encrypt_as deprecated.  They are now aliases
for the $(pgp/smime)_default_key config vars.

Change $(pgp/smime)_self_encrypt default to set.

The intent is that most users now need only set
$(pgp/smime)_default_key.  If they have a sign-only key, or have
separate signing and encryption keys, they can put that in
$(pgp/smime)_sign_as.  This also enables to default self_encrypt on
and solve a very common request.

Thanks to Michele Marcionelli and Vincent Lefèvre for gently pushing
me towards a solution.

6 years agoUpdated French translation.
Vincent Lefevre [Tue, 9 Jan 2018 03:09:11 +0000 (04:09 +0100)]
Updated French translation.

6 years agocmd_handle_fatal: make error message a bit more descriptive
Fabian Groffen [Sun, 7 Jan 2018 12:06:56 +0000 (13:06 +0100)]
cmd_handle_fatal: make error message a bit more descriptive

When there are multiple IMAP connections available, "Mailbox closed"
doesn't give a hint as to which one.  Use account info to identify which
mailbox was closed.

6 years agoFix imap status count range check.
Kevin McCarthy [Sun, 7 Jan 2018 20:12:42 +0000 (12:12 -0800)]
Fix imap status count range check.

The strtoul() call for parsing the STATUS count wasn't checking the
range properly, because it was assigning to an unsigned int.

Change to assign to a unsigned long, and also add the conversion check
from mutt_atoui().

Thanks to Charles (@chdiza) for quickly noticing the problem!

6 years agoChange imap literal counts to parse and store unsigned ints.
Kevin McCarthy [Sat, 6 Jan 2018 23:55:17 +0000 (15:55 -0800)]
Change imap literal counts to parse and store unsigned ints.

IMAP literals are of type number.  Change imap_get_literal_count() to
use mutt_atoui() instead of atoi().  Change the return type variables
used to store the count to type unsigned int.

It's doubtful this was a real issue, but as long as we're cleaning up
incorrect atoi() usage, we should fix this too.

6 years agoFix improper signed int conversion of IMAP uid and msn values.
Kevin McCarthy [Sat, 6 Jan 2018 04:39:50 +0000 (20:39 -0800)]
Fix improper signed int conversion of IMAP uid and msn values.

Several places in the imap code, when parsing "number" and "nz-number"
values from the IMAP data, use atoi() and strtol().  This is
incorrect, and can result in failures when a uid value happens to be
larger than 2^31.

Create a helper function, mutt_atoui() and use that instead.  One
place was using strtol() and relying on the endptr parameter, and so
was changed to use strtoul() instead.

Thanks to Paul Saunders for the bug report and original patch, which
this commit is based on.

6 years agoUpdated French translation.
Vincent Lefevre [Thu, 4 Jan 2018 16:59:20 +0000 (17:59 +0100)]
Updated French translation.

6 years agoDisable message security if the backend is not available.
Kevin McCarthy [Sun, 31 Dec 2017 03:10:16 +0000 (19:10 -0800)]
Disable message security if the backend is not available.

Gitlab issue #3 exposed an awkward corner case: if mutt is configured
without PGP or S/MIME, and with GPGME, but $crypt_use_gpgme is unset.
In this case, no backend will be available, but WithCrypto will be set
with both APPLICATION_PGP and APPLICATION_SMIME bits.

That will allow various config vars to enable encryption or signing,
even though there will be no backend available to perform them.  The
message security flag might then be set, but when the user hits send,
will end up back at the compose menu due to the error.

The pgp or smime menu might not even be available to clear the
security setting!

Add a check in send.c before the compose menu is invoked, and give a
warning message for the menu ops inside the compose menu.

I believe this should prevent the issue.  However this is a corner
case combined with user misconfiguration, so I don't believe is worth
a large effort to completely eradicate.

6 years agoMention self_encrypt options in the documentation. (closes #3983)
Kevin McCarthy [Thu, 28 Dec 2017 21:07:21 +0000 (13:07 -0800)]
Mention self_encrypt options in the documentation. (closes #3983)

Add a paragraph to the "Sending Cryptographically Signed/Encrypted
Messages" section of the manual.

6 years agoUpdate copyright notices.
Kevin McCarthy [Wed, 29 Nov 2017 03:01:15 +0000 (19:01 -0800)]
Update copyright notices.

6 years agoReview fuzzy lt translations
Marius Gedminas [Wed, 8 Nov 2017 13:55:54 +0000 (15:55 +0200)]
Review fuzzy lt translations

6 years agoupdate translations
Richard Russon [Thu, 4 Jan 2018 20:54:10 +0000 (20:54 +0000)]
update translations

6 years agoFix line split logic in help (#1019)
Pietro Cerutti [Tue, 2 Jan 2018 11:59:43 +0000 (11:59 +0000)]
Fix line split logic in help (#1019)

* Fix line split logic in help

Fixes #1018

6 years agomerge: trivial improvements
Richard Russon [Mon, 1 Jan 2018 12:11:16 +0000 (12:11 +0000)]
merge: trivial improvements

 * add missing {}s
 * doxygen
 * rename functions: adr -> addr
 * rename params/args/vars: adr -> addr
 * docs: drop reference to waffle backlog

6 years agodocs: drop reference to waffle backlog
Richard Russon [Sun, 31 Dec 2017 12:22:44 +0000 (12:22 +0000)]
docs: drop reference to waffle backlog

6 years agorename params/args/vars: adr -> addr
Richard Russon [Sun, 31 Dec 2017 12:12:36 +0000 (12:12 +0000)]
rename params/args/vars: adr -> addr

6 years agorename functions: adr -> addr
Richard Russon [Sun, 31 Dec 2017 12:05:13 +0000 (12:05 +0000)]
rename functions: adr -> addr

6 years agodoxygen
Richard Russon [Sun, 31 Dec 2017 02:49:22 +0000 (02:49 +0000)]
doxygen

6 years agoadd missing {}s
Richard Russon [Fri, 29 Dec 2017 11:55:30 +0000 (11:55 +0000)]
add missing {}s

6 years agofix regex parsing
Richard Russon [Mon, 1 Jan 2018 12:07:48 +0000 (12:07 +0000)]
fix regex parsing

6 years agofix display of special chars
Richard Russon [Mon, 1 Jan 2018 11:43:56 +0000 (11:43 +0000)]
fix display of special chars

6 years agomerge: move charset and idna functions to libmutt
Richard Russon [Sun, 31 Dec 2017 01:26:35 +0000 (01:26 +0000)]
merge: move charset and idna functions to libmutt

 * clang-format
 * reorg: idna -> address, envelope
 * private hooks for charset
 * move charset functions to muttlib
 * move idna functions to muttlib
 * move address functions
 * iwyu / comments

6 years agoiwyu / comments
Richard Russon [Sat, 30 Dec 2017 16:51:13 +0000 (16:51 +0000)]
iwyu / comments

6 years agomove address functions
Richard Russon [Sat, 30 Dec 2017 16:25:01 +0000 (16:25 +0000)]
move address functions

6 years agomove idna functions to muttlib
Richard Russon [Sat, 30 Dec 2017 16:15:09 +0000 (16:15 +0000)]
move idna functions to muttlib

6 years agomove charset functions to muttlib
Richard Russon [Sat, 30 Dec 2017 16:05:25 +0000 (16:05 +0000)]
move charset functions to muttlib

6 years agoprivate hooks for charset
Richard Russon [Sat, 30 Dec 2017 15:53:12 +0000 (15:53 +0000)]
private hooks for charset

6 years agoreorg: idna -> address, envelope
Richard Russon [Sat, 30 Dec 2017 15:30:39 +0000 (15:30 +0000)]
reorg: idna -> address, envelope

6 years agoclang-format
Richard Russon [Sat, 30 Dec 2017 16:38:33 +0000 (16:38 +0000)]
clang-format

6 years agomerge: Prepare the code for the new config system
Richard Russon [Thu, 28 Dec 2017 20:19:38 +0000 (20:19 +0000)]
merge: Prepare the code for the new config system

 * regex obj to ptr
 * refactor the hash types
 * expand global bools,quadoptions
 * Rename all the config bools OPT_ABC_XYZ -> AbcXyz
 * Adjust the members of struct Options
 * group the synonyms at the end of the list
 * move all config variables to the end of the file

6 years agomove all config variables to the end of the file
Richard Russon [Tue, 31 Oct 2017 13:41:32 +0000 (13:41 +0000)]
move all config variables to the end of the file

6 years agogroup the synonyms at the end of the list
Richard Russon [Tue, 31 Oct 2017 12:37:24 +0000 (12:37 +0000)]
group the synonyms at the end of the list

6 years agoAdjust the members of struct Options
Richard Russon [Mon, 30 Oct 2017 02:14:27 +0000 (02:14 +0000)]
Adjust the members of struct Options

6 years agoRename all the config bools OPT_ABC_XYZ -> AbcXyz
Richard Russon [Mon, 30 Oct 2017 00:42:25 +0000 (00:42 +0000)]
Rename all the config bools OPT_ABC_XYZ -> AbcXyz

6 years agoexpand global bools,quadoptions
Richard Russon [Sun, 29 Oct 2017 23:22:40 +0000 (23:22 +0000)]
expand global bools,quadoptions

Replace the packed array of booleans with separate `bool`s.

6 years agorefactor the hash types
Richard Russon [Fri, 1 Sep 2017 15:04:04 +0000 (16:04 +0100)]
refactor the hash types

The HashElem now contains the type of the data.
Also, the destructor is set once at the creation of the Hash table.

6 years agoregex obj to ptr
Richard Russon [Wed, 1 Nov 2017 02:39:27 +0000 (02:39 +0000)]
regex obj to ptr

Change the backing variables for config from objects to pointers.

6 years agomerge: Move regex functions to muttlib
Richard Russon [Thu, 28 Dec 2017 16:15:27 +0000 (16:15 +0000)]
merge: Move regex functions to muttlib

 * move functions to muttlib
 * rename functions
 * rename parameters
 * reorder parameters
 * add doxygen comments

6 years agoadd doxygen comments
Richard Russon [Sun, 24 Dec 2017 17:47:30 +0000 (17:47 +0000)]
add doxygen comments

6 years agoreorder parameters
Richard Russon [Sun, 24 Dec 2017 17:46:11 +0000 (17:46 +0000)]
reorder parameters

6 years agorename parameters
Richard Russon [Sun, 24 Dec 2017 17:32:37 +0000 (17:32 +0000)]
rename parameters

6 years agorename functions
Richard Russon [Sun, 24 Dec 2017 17:13:49 +0000 (17:13 +0000)]
rename functions

6 years agomove functions to muttlib
Richard Russon [Sun, 24 Dec 2017 16:52:54 +0000 (16:52 +0000)]
move functions to muttlib

6 years agoAdd mutt_mb_is_lower() to muttlib
Richard Russon [Wed, 6 Dec 2017 01:03:32 +0000 (01:03 +0000)]
Add mutt_mb_is_lower() to muttlib

This is based on mutt_which_case() which had a unnecessary Regex
constant embedded in it.

6 years agoBuffer improvements
Richard Russon [Thu, 21 Dec 2017 17:43:38 +0000 (17:43 +0000)]
Buffer improvements

Add new functions:
- mutt_buffer_alloc()
- mutt_buffer_is_empty()

Change functions to return the number of bytes written:
- mutt_buffer_addch()
- mutt_buffer_addstr()

6 years agonested-if: correctly handle "<" and ">" with %?
Aleksa Sarai [Sun, 17 Dec 2017 13:39:08 +0000 (00:39 +1100)]
nested-if: correctly handle "<" and ">" with %?

As part of the implementation of nested-if[1], we translate old-style
conditional expandos into nested-if expandos. However, this translation
did not account for the metacharacters that need to be escaped in
nested-if expandos that are valid in old-style expandos (in particular
"<" and ">"). Correct this by escaping the relevant metacharacters.

With this patch, it is now possible to do something like

  :set status_format=" %rMail%r >%?u? +%u >?"

Without causing an ">" to be included if %u is 0 (which used to be the
case).

[1]: https://www.neomutt.org/feature/nested-if

Fixes #1001

6 years agoencapsulate idna code
Richard Russon [Fri, 22 Dec 2017 22:59:45 +0000 (22:59 +0000)]
encapsulate idna code

Move all the defines, etc, into mutt_idna.c

6 years agofix gmail server-size search
Richard Russon [Wed, 20 Dec 2017 17:18:29 +0000 (17:18 +0000)]
fix gmail server-size search

Fixes #1013

6 years agoFix s/mime certificate deletion bug
Kevin McCarthy [Fri, 15 Dec 2017 20:09:42 +0000 (12:09 -0800)]
Fix s/mime certificate deletion bug

Commit c1bcf4ba exposed a bug in the s/mime encryption code.  It was
errorneously calling unlink on the list of generated cert files to
use.

Prior to that commit, the list had an initial space, which apparently
made the unlink fail.  After that commit, encrypting to a single
certificate would end up deleting the certificate.

Remove the calls to unlink the cert file.  Add some missing cleanup if
the call to openssl fails.

Fixes #1006

6 years agomerge: fix coverity defects
Richard Russon [Thu, 28 Dec 2017 13:41:15 +0000 (13:41 +0000)]
merge: fix coverity defects

 * identical code for different branches
 * fix resource leaks
 * Array compared against 0
 * Pointer to local outside scope
 * hdr can't be NULL
 * remove unused values
 * fix use of 'fallthrough' comments

6 years agofix use of 'fallthrough' comments
Richard Russon [Sat, 16 Dec 2017 14:47:11 +0000 (14:47 +0000)]
fix use of 'fallthrough' comments

6 years agoremove unused values
Richard Russon [Sat, 16 Dec 2017 00:05:38 +0000 (00:05 +0000)]
remove unused values

6 years agohdr can't be NULL
Richard Russon [Fri, 15 Dec 2017 23:56:27 +0000 (23:56 +0000)]
hdr can't be NULL

6 years agoPointer to local outside scope
Richard Russon [Fri, 15 Dec 2017 14:51:14 +0000 (14:51 +0000)]
Pointer to local outside scope

The code returned a pointer to an array that had gone out of scope.

6 years agoArray compared against 0
Richard Russon [Fri, 15 Dec 2017 14:35:36 +0000 (14:35 +0000)]
Array compared against 0

6 years agofix resource leaks
Richard Russon [Fri, 15 Dec 2017 14:32:23 +0000 (14:32 +0000)]
fix resource leaks

6 years agoidentical code for different branches
Richard Russon [Fri, 15 Dec 2017 14:23:36 +0000 (14:23 +0000)]
identical code for different branches

`SETCOLOR(MT_COLOR_NORMAL)` caused identical code to be generated in
both branches of an `if` statement.