]> granicus.if.org Git - neomutt/log
neomutt
6 years agoEnhance docs re security of SSL/TLS version vars
Sam Pablo Kuper [Sun, 2 Dec 2018 22:32:35 +0000 (22:32 +0000)]
Enhance docs re security of SSL/TLS version vars

6 years agoDeprecate TLS 1.0 and 1.1 by default
Sam Pablo Kuper [Sun, 2 Dec 2018 22:31:19 +0000 (22:31 +0000)]
Deprecate TLS 1.0 and 1.1 by default

Fixes #101.

Minor digit of version number has been bumped per [Semantic Versioning
2.0.0](https://semver.org/spec/v2.0.0.html) §7:

> Minor version Y (x.Y.z | x > 0) MUST be incremented if ... any public
> API functionality is marked as deprecated.

6 years agoDocument Sender header as a default in $imap_headers
Kevin McCarthy [Sat, 1 Dec 2018 19:27:20 +0000 (11:27 -0800)]
Document Sender header as a default in $imap_headers

6 years agoAdd SENDER to default list of IMAP headers
Kevin McCarthy [Thu, 29 Nov 2018 20:36:08 +0000 (12:36 -0800)]
Add SENDER to default list of IMAP headers

This header is matched by the ~e and ~L patterns.  Those patterns
should work without the user having to know to add Sender to the list
of $imap_headers.  This was probably just an oversight.

6 years agoImprove pgp error message for translation
Kevin McCarthy [Wed, 28 Nov 2018 03:06:42 +0000 (19:06 -0800)]
Improve pgp error message for translation

The past tense phrase makes it unclear whether the error is about a
failed action or the state of the message.

Thanks to Vincent Lefèvre for the improved wording suggestion.

6 years agoFix QRESYNC crash after a large number of VANISHED messages
Kevin McCarthy [Tue, 27 Nov 2018 21:55:04 +0000 (13:55 -0800)]
Fix QRESYNC crash after a large number of VANISHED messages

When handling QRESYNC vanished, imap_expunge_mailbox() was called to
empty out the messages.  Various counters, including vcount are
updated by the mx_update_tables() after the expunge.

These counters need to be reset, because mx_update_context() will do
so once again at the end of reading new headers.  This can cause an
out of bounds access in v2r.

6 years agoPrevent trying to match a failing color body regex repeatedly
Kevin McCarthy [Mon, 26 Nov 2018 03:48:49 +0000 (19:48 -0800)]
Prevent trying to match a failing color body regex repeatedly

Emails with really long lines (e.g. spam), can suffer performance if a
complicated regex is matched to no effect over and over.  If the regex
failed at the beginning, it won't match at the end of another's regex
match range, so turn it off.

6 years agoclang-format
Richard Russon [Mon, 10 Dec 2018 13:52:51 +0000 (13:52 +0000)]
clang-format

6 years agomerge: document all the globals
Richard Russon [Mon, 10 Dec 2018 00:58:29 +0000 (00:58 +0000)]
merge: document all the globals

 * globals: upper case
 * drop duplicate externs
 * doxy: rename config pages
 * doxy: fix header
 * doxy: document menus
 * doxy: doc globals
 * doxy: add pages

6 years agodoxy: add pages
Richard Russon [Mon, 10 Dec 2018 00:37:19 +0000 (00:37 +0000)]
doxy: add pages

6 years agodoxy: doc globals
Richard Russon [Mon, 10 Dec 2018 00:17:24 +0000 (00:17 +0000)]
doxy: doc globals

6 years agodoxy: document menus
Richard Russon [Sun, 9 Dec 2018 15:42:17 +0000 (15:42 +0000)]
doxy: document menus

6 years agodoxy: fix header
Richard Russon [Sun, 9 Dec 2018 15:12:59 +0000 (15:12 +0000)]
doxy: fix header

6 years agodoxy: rename config pages
Richard Russon [Thu, 6 Dec 2018 23:21:25 +0000 (23:21 +0000)]
doxy: rename config pages

6 years agodrop duplicate externs
Richard Russon [Sun, 9 Dec 2018 14:47:24 +0000 (14:47 +0000)]
drop duplicate externs

6 years agoglobals: upper case
Richard Russon [Sun, 9 Dec 2018 15:07:21 +0000 (15:07 +0000)]
globals: upper case

6 years agoglobals: upper case
Richard Russon [Sun, 9 Dec 2018 15:01:02 +0000 (15:01 +0000)]
globals: upper case

6 years agoglobals: upper case
Richard Russon [Sun, 9 Dec 2018 14:55:20 +0000 (14:55 +0000)]
globals: upper case

6 years agoimap: imap_expunge_mailbox should take Mailbox as argument
Mehdi Abaakouk [Sat, 8 Dec 2018 13:35:32 +0000 (14:35 +0100)]
imap: imap_expunge_mailbox should take Mailbox as argument

6 years agoimap: always use mdata/adata getter
Mehdi Abaakouk [Sat, 8 Dec 2018 13:34:46 +0000 (14:34 +0100)]
imap: always use mdata/adata getter

6 years agoimap: remove useless imap_check
Mehdi Abaakouk [Fri, 7 Dec 2018 19:40:34 +0000 (20:40 +0100)]
imap: remove useless imap_check

imap_check_mailbox and imap_check are the same with different signature.

This change just use the one signature everywhere.

6 years agoimap: always set mdata
Mehdi Abaakouk [Fri, 7 Dec 2018 19:15:49 +0000 (20:15 +0100)]
imap: always set mdata

imap_prepare_mbox is called everywhere now.

So this change just set mdata when the mailbox is added.

6 years agombox_check_stats: fix MailboxCount
Mehdi Abaakouk [Fri, 7 Dec 2018 20:15:07 +0000 (21:15 +0100)]
mbox_check_stats: fix MailboxCount

The new mbox_check_stats work well, but MailboxCount was not correctly
updated.

This change fixes that.

6 years agoreset notmuch Mailbox->size on opening
Jenya Sovetkin [Fri, 7 Dec 2018 17:54:04 +0000 (18:54 +0100)]
reset notmuch Mailbox->size on opening

previous behaviour: size was not reset. This resulted in mailbox size to
accumulate on each mailbox reopening, hence displaying incorrect mailbox
size information in the status bar.

new behaviour: size is reset to zero.

steps to replicate previous behaviour: open neomutt with vfolder. Press
space to refresh vfolder (open from sidebar) several times. Mailbox size
in the status bar accumulates.

6 years agoTry to fix the mbox_check_stats() merge
Pietro Cerutti [Fri, 7 Dec 2018 09:58:32 +0000 (09:58 +0000)]
Try to fix the mbox_check_stats() merge

6 years agomerge: mxapi: add mbox_check_stats()
Richard Russon [Fri, 7 Dec 2018 01:25:16 +0000 (01:25 +0000)]
merge: mxapi: add mbox_check_stats()

 * mxapi: add mbox_check_stats()
 * imap: use mbox_check_stats()
 * mbox: use mbox_check_stats()
 * notmuch: use mbox_check_stats()
 * maildir: use mbox_check_stats()
 * maildir: tidy maildir_check_dir()

6 years agomaildir: tidy maildir_check_dir() 1407/head
Richard Russon [Fri, 7 Dec 2018 00:43:38 +0000 (00:43 +0000)]
maildir: tidy maildir_check_dir()

6 years agomaildir: use mbox_check_stats()
Austin Ray [Fri, 7 Dec 2018 00:41:07 +0000 (00:41 +0000)]
maildir: use mbox_check_stats()

6 years agonotmuch: use mbox_check_stats()
Austin Ray [Fri, 7 Dec 2018 00:10:32 +0000 (00:10 +0000)]
notmuch: use mbox_check_stats()

6 years agombox: use mbox_check_stats()
Austin Ray [Fri, 7 Dec 2018 00:10:20 +0000 (00:10 +0000)]
mbox: use mbox_check_stats()

6 years agoimap: use mbox_check_stats()
Austin Ray [Fri, 7 Dec 2018 00:09:38 +0000 (00:09 +0000)]
imap: use mbox_check_stats()

6 years agomxapi: add mbox_check_stats()
Austin Ray [Fri, 7 Dec 2018 00:04:26 +0000 (00:04 +0000)]
mxapi: add mbox_check_stats()

6 years agomerge: upstream GPGME improvements
Pietro Cerutti [Thu, 6 Dec 2018 11:55:43 +0000 (11:55 +0000)]
merge: upstream GPGME improvements

 * Require GPGME version 1.2.0 and drop useless HAVE macros.
 * Always use the gpgme_new wrapper in crypt-gpgme.
 * Try to avoid creation of temp. directory for key import.
 * Improve the console output for extract-keys and speed up import.

6 years agoImprove the console output for extract-keys and speed up import. 1478/head
Werner Koch [Mon, 3 Dec 2018 07:41:56 +0000 (08:41 +0100)]
Improve the console output for extract-keys and speed up import.

The listing of imported keys to the console must have stopped working
on 2014-12-31 due to a fix for bug #3698, commit
bbc5acb6de0ca56d7e8366402d68a1a919ca9b23 which was needed due to a
not fully working stub code introduced in 2008 with commit
a4b3a60dd63bc7af7927025b2d1344530ca89aa9.

The latter commit also introduced a bug in the import code which
listed all keys in the keyring to a temporary file and copied that one
to stdout.  The former commit avoided the output to stdout.

The fix here is to use pgp_gpgme_extract_keys only for extracting
information about the key and don't re-use the same code for importing
keys.  We now import the keys directly in pgp_gpgme_invoke_import and
we print the fingerprint and status flags for all imported keys.  That
information available from GPGME for ages (0.3.1 from 2003).
The user id is unfortunately not printed; that would require a lookup
of the newly imported key.  Can be done with another patch.

6 years agoTry to avoid creation of temp. directory for key import.
Werner Koch [Mon, 3 Dec 2018 07:41:55 +0000 (08:41 +0100)]
Try to avoid creation of temp. directory for key import.

Since gpgme 1.9.0 it is possible to list keys directly from a file
without importing it into gpg' own keyring.  This patch implements
this in a backward compatible way.

Unfortunately we need to check for a suitable gpgme version at build
time and also for a suitable gpg version at runtime.  This is
implemented by a version check which requires to call or include code
taken from libgpg-error (aka gpgrt).  However this library is anyway a
dependency of gpgme and thus does not pose any extra burden.

The functions parse_version_number, parse_version_string, and
cmp_version_strings are taken from libgpg-error's repo at 2018-11-20.
Libgpg-error is distributed under the LGPL-2.1-or-later.

6 years agoAlways use the gpgme_new wrapper in crypt-gpgme.
Werner Koch [Mon, 3 Dec 2018 07:41:54 +0000 (08:41 +0100)]
Always use the gpgme_new wrapper in crypt-gpgme.

The wrapper is much more convenient and there is no need to sometimes
use gpgme_new directly.  The perceived advantage on not bailing out in
an out-of-core condition is not realistic because other small amounts
of memory are allocated all over mutt anyway and thus function will
terminate the process as well.

This patch also changes the minimum version of gpgme to 1.4.0.  This
is so that we can always pass NULL to functions like gpgme_release.
Further 1.4.0 has new functions which we may soon like to use.

6 years agoRequire GPGME version 1.2.0 and drop useless HAVE macros.
Werner Koch [Mon, 3 Dec 2018 07:41:53 +0000 (08:41 +0100)]
Require GPGME version 1.2.0 and drop useless HAVE macros.

GPGME 1.2.0 was released nearly 10 years ago and thus we can really
demand this version.  For various reasons it would be advisable to
require a decent version but that is a different thing and needs to be
done in a separate patch.

HAVE_GPGME_OP_EXPORT_KEYS and HAVE_GPGME_PKA_TRUST are not anymore
needed because they are supported by that GPGME version.

6 years agoRename crypto_chars to crypt_chars (plus implementation stuff) for consistency
Pietro Cerutti [Thu, 6 Dec 2018 10:57:31 +0000 (10:57 +0000)]
Rename crypto_chars to crypt_chars (plus implementation stuff) for consistency

6 years agoadd $crypto_chars to customise the index
Pablo Ovelleiro Corral [Mon, 3 Dec 2018 16:52:04 +0000 (17:52 +0100)]
add $crypto_chars to customise the index

Fixes #1469

6 years agoAdd the "attach_save_dir" config variable 1468/head
Pietro Cerutti [Fri, 30 Nov 2018 13:04:48 +0000 (13:04 +0000)]
Add the "attach_save_dir" config variable

This specifies the location where attachments are saved. The default is
the current working directory.

- Suggest a directory even if the attachment doesn't have a name
- Do not clear the prompt buffer when modifying a suggested filename
- Default to "./" if attach_save_dir is empty or unset

Fixes #1465

6 years agombox: strip more Contexts
Richard Russon [Fri, 30 Nov 2018 14:16:17 +0000 (14:16 +0000)]
mbox: strip more Contexts

6 years agoCall mx_update_context from mx_mbox_check, if needed 1472/head
Pietro Cerutti [Mon, 3 Dec 2018 15:26:02 +0000 (15:26 +0000)]
Call mx_update_context from mx_mbox_check, if needed

6 years agoRecompute and re-thread everything in mx_update_context
Pietro Cerutti [Mon, 3 Dec 2018 15:25:01 +0000 (15:25 +0000)]
Recompute and re-thread everything in mx_update_context

This allows us to be less strict about calling mx_update_context, e.g.,
by calling it twice if it so happens within a code path.

6 years agonotmuch: check for long run during db free
Austin Ray [Wed, 14 Nov 2018 02:12:09 +0000 (21:12 -0500)]
notmuch: check for long run during db free

`nm_db_release(...)` should protect against freeing a long run database.
Prior to this commit, it was up to the programmer to ensure that a long
run database was not released.

The commit moves the check into `nm_db_release(...)` and removes the
checks elsewhere to reduce unnecessary, repeated checks.

6 years agonotmuch: use guard-clauses pre-condition check
Austin Ray [Sat, 10 Nov 2018 04:24:49 +0000 (23:24 -0500)]
notmuch: use guard-clauses pre-condition check

Several functions used an if statement with the body of the function
inside the if block. Instead, negate the if statement and return early.
This makes it easier to keep track of invariants.

6 years agocheck context before using mailbox
Richard Russon [Sun, 2 Dec 2018 12:05:41 +0000 (12:05 +0000)]
check context before using mailbox

6 years agomerge: document enums
Richard Russon [Sun, 2 Dec 2018 04:04:30 +0000 (04:04 +0000)]
merge: document enums

 * rename FlagChars enums
 * doxy: document enums
 * enum: rename AddressError consts
 * enum: rename SMTP capability consts
 * enum: rename IMAP capability consts
 * enum: rename end markers to MAX
 * doxy: document enums
 * doxy: document enums
 * enums: tidying

6 years agoenums: tidying
Richard Russon [Sun, 2 Dec 2018 00:19:53 +0000 (00:19 +0000)]
enums: tidying

6 years agodoxy: document enums
Richard Russon [Sun, 2 Dec 2018 03:45:27 +0000 (03:45 +0000)]
doxy: document enums

6 years agodoxy: document enums
Richard Russon [Sun, 2 Dec 2018 03:24:37 +0000 (03:24 +0000)]
doxy: document enums

6 years agoenum: rename end markers to MAX
Richard Russon [Sun, 2 Dec 2018 00:58:33 +0000 (00:58 +0000)]
enum: rename end markers to MAX

6 years agoenum: rename IMAP capability consts
Richard Russon [Sun, 2 Dec 2018 00:46:16 +0000 (00:46 +0000)]
enum: rename IMAP capability consts

6 years agoenum: rename SMTP capability consts
Richard Russon [Sun, 2 Dec 2018 00:42:56 +0000 (00:42 +0000)]
enum: rename SMTP capability consts

6 years agoenum: rename AddressError consts
Richard Russon [Sun, 2 Dec 2018 00:23:59 +0000 (00:23 +0000)]
enum: rename AddressError consts

6 years agodoxy: document enums
Richard Russon [Sun, 2 Dec 2018 00:16:20 +0000 (00:16 +0000)]
doxy: document enums

6 years agorename FlagChars enums
Richard Russon [Tue, 27 Nov 2018 22:44:10 +0000 (22:44 +0000)]
rename FlagChars enums

6 years agomerge: nntp: refactoring
Richard Russon [Sat, 1 Dec 2018 23:25:51 +0000 (23:25 +0000)]
merge: nntp: refactoring

 * doc: newsrc expando examples
 * nntp: move browser code
 * nntp: tidy headers
 * nntp: move auto-complete code

6 years agonntp: move auto-complete code
Richard Russon [Sat, 1 Dec 2018 18:12:46 +0000 (18:12 +0000)]
nntp: move auto-complete code

6 years agonntp: tidy headers
Richard Russon [Sat, 1 Dec 2018 16:12:03 +0000 (16:12 +0000)]
nntp: tidy headers

6 years agonntp: move browser code
Richard Russon [Sat, 1 Dec 2018 15:47:41 +0000 (15:47 +0000)]
nntp: move browser code

6 years agodoc: newsrc expando examples
Richard Russon [Sat, 1 Dec 2018 13:22:44 +0000 (13:22 +0000)]
doc: newsrc expando examples

6 years agomore Context refactoring/protection
Richard Russon [Sat, 1 Dec 2018 21:14:33 +0000 (21:14 +0000)]
more Context refactoring/protection

6 years agotravis: move to xenial
Richard Russon [Fri, 30 Nov 2018 12:59:35 +0000 (12:59 +0000)]
travis: move to xenial

6 years agosync translations
Richard Russon [Fri, 30 Nov 2018 12:07:28 +0000 (12:07 +0000)]
sync translations

6 years agoimap: login on startup
Mehdi Abaakouk [Thu, 29 Nov 2018 14:09:55 +0000 (15:09 +0100)]
imap: login on startup

This ensure we always have a valid adata.

Closes #1438

6 years agoFix unsub from the selected mailbox by just hiding it
Pietro Cerutti [Thu, 29 Nov 2018 09:30:30 +0000 (09:30 +0000)]
Fix unsub from the selected mailbox by just hiding it

Fixes #1460

6 years agopostpone: fix Postcount when we are in current selected mailbox
Mehdi Abaakouk [Wed, 28 Nov 2018 13:57:31 +0000 (14:57 +0100)]
postpone: fix Postcount when we are in current selected mailbox

6 years agopostpone: Don't reopen Postponed context
Mehdi Abaakouk [Wed, 21 Nov 2018 11:32:24 +0000 (12:32 +0100)]
postpone: Don't reopen Postponed context

If the selected Mailbox is already the Postponed one, no need to open a
new context.

This change reuse the current context.

6 years agomerge: factor out mx_update_context()
Richard Russon [Thu, 29 Nov 2018 13:13:01 +0000 (13:13 +0000)]
merge: factor out mx_update_context()

 * mxapi: add Mailbox to mbox_open
 * reset message counts
 * maildir: factor out mx_update_context()
 * mbox: factor out mx_update_context()
 * pop: factor out mx_update_context()
 * nntp: factor out mx_update_context()
 * notmuch: factor out mx_update_context()
 * imap: factor out mx_update_context()

6 years agoimap: factor out mx_update_context() 1457/head
Richard Russon [Wed, 28 Nov 2018 12:09:41 +0000 (12:09 +0000)]
imap: factor out mx_update_context()

6 years agonotmuch: factor out mx_update_context()
Richard Russon [Tue, 20 Nov 2018 23:55:05 +0000 (23:55 +0000)]
notmuch: factor out mx_update_context()

6 years agonntp: factor out mx_update_context()
Richard Russon [Tue, 20 Nov 2018 23:08:36 +0000 (23:08 +0000)]
nntp: factor out mx_update_context()

6 years agopop: factor out mx_update_context()
Richard Russon [Tue, 20 Nov 2018 16:53:36 +0000 (16:53 +0000)]
pop: factor out mx_update_context()

6 years agombox: factor out mx_update_context()
Richard Russon [Tue, 20 Nov 2018 14:59:44 +0000 (14:59 +0000)]
mbox: factor out mx_update_context()

6 years agomaildir: factor out mx_update_context()
Richard Russon [Mon, 19 Nov 2018 23:04:17 +0000 (23:04 +0000)]
maildir: factor out mx_update_context()

6 years agoreset message counts
Richard Russon [Tue, 27 Nov 2018 16:10:54 +0000 (16:10 +0000)]
reset message counts

6 years agomxapi: add Mailbox to mbox_open
Richard Russon [Mon, 19 Nov 2018 17:10:08 +0000 (17:10 +0000)]
mxapi: add Mailbox to mbox_open

6 years agoimap: handle case where adata->mailbox is NULL
Mehdi Abaakouk [Wed, 28 Nov 2018 20:50:02 +0000 (21:50 +0100)]
imap: handle case where adata->mailbox is NULL

When selected mailbox in unsubscribed, adata->mailbox may be NULL.

make imap_cmd_finish() handles it.

Closes #1460

6 years agoReplace git_ver.h with a combination of git_ver.{c,o}
Marco Sirabella [Fri, 23 Nov 2018 17:41:40 +0000 (12:41 -0500)]
Replace git_ver.h with a combination of git_ver.{c,o}

6 years agofix crash in eat_date()
Mehdi Abaakouk [Wed, 28 Nov 2018 12:07:45 +0000 (13:07 +0100)]
fix crash in eat_date()

6 years agonotmuch: don't overwrite nm_default_uri
Austin Ray [Tue, 27 Nov 2018 03:07:38 +0000 (22:07 -0500)]
notmuch: don't overwrite nm_default_uri

In commit 1040935, I accidentally removed a check for using `Folder` as
the `db_filename` if `db_filename` is null. My change made it so that it
always overwrote the value.

6 years agomerge: upstream changes
Richard Russon [Mon, 26 Nov 2018 18:29:31 +0000 (18:29 +0000)]
merge: upstream changes

 * Add mutt_buffer_mktemp() transition function
 * Add mutt_buffer_adv_mktemp() transition function
 * Always print mutt_buffer_pool_free() size debug output
 * add Buffer fixup functions
 * Remove conversion of nbsp to space
 * Ensure a resized empty buffer is null-terminated
 * Fix memleaks of saslconn on error paths
 * Fix memory leak on error in eat_regexp() and eat_date()
 * Document send-hooks are not executed for resumed messages
 * Fix a few memory leaks for idna conversion
 * Allow relative date hour/min/sec offsets
 * Add some brief documentation on OAUTH support
 * Update $index_format cross-references in manual
 * Add L10N comments to several unclear messages
 * Switch color chunk matching to use bsearch

6 years agoSwitch color chunk matching to use bsearch
Kevin McCarthy [Mon, 19 Nov 2018 03:13:20 +0000 (19:13 -0800)]
Switch color chunk matching to use bsearch

Emails with extremely long lines, combined with a large number of
color matches, can cause a performance hit so severe that mutt appears
to have hung.

Switching out to using a binary search speeds things up noticably.

The for loops being replaced were a bit strange.  resolve_types()
ensures there are no overlaps, and that they are ordered.  A match is
defined by (first <= cnt < last).  I can't see any reason for the
strange comparison of (cnt > last) follow by (cnt != last).  Perhaps
at one time it made sense.

6 years agoAdd L10N comments to several unclear messages
TAKAHASHI Tamotsu [Sun, 18 Nov 2018 18:05:30 +0000 (10:05 -0800)]
Add L10N comments to several unclear messages

Updating Japanese translation, I found that some of the updated messages
were a little hard to understand without reading the code.

Add comments to some messages I nearly translated in a wrong way.

6 years agoUpdate $index_format cross-references in manual
Kevin McCarthy [Wed, 14 Nov 2018 22:13:47 +0000 (14:13 -0800)]
Update $index_format cross-references in manual

Add index-format-hook to the list of hooks.

Add the list of configuration variables that use the expandos.

Add a note to $post_index_string that it uses the expandos.

6 years agoAdd some brief documentation on OAUTH support
Kevin McCarthy [Wed, 7 Nov 2018 21:38:53 +0000 (13:38 -0800)]
Add some brief documentation on OAUTH support

These are just pulled from Brandon's commit message.

6 years agoAllow relative date hour/min/sec offsets
Kevin McCarthy [Tue, 6 Nov 2018 21:21:20 +0000 (13:21 -0800)]
Allow relative date hour/min/sec offsets

These might be useful for index-format-hook pattern matching for some
people.

6 years agoFix a few memory leaks for idna conversion
Kevin McCarthy [Tue, 6 Nov 2018 19:02:01 +0000 (11:02 -0800)]
Fix a few memory leaks for idna conversion

6 years agoDocument send-hooks are not executed for resumed messages
Kevin McCarthy [Tue, 6 Nov 2018 01:44:20 +0000 (17:44 -0800)]
Document send-hooks are not executed for resumed messages

6 years agoFix memory leak on error in eat_regexp() and eat_date()
Kevin McCarthy [Tue, 30 Oct 2018 15:55:52 +0000 (08:55 -0700)]
Fix memory leak on error in eat_regexp() and eat_date()

6 years agoFix memleaks of saslconn on error paths
Peter Wu [Tue, 23 Oct 2018 10:29:26 +0000 (12:29 +0200)]
Fix memleaks of saslconn on error paths

If mutt_sasl_client_new returns an error, the callers would ignore the
allocated saslconn resource from sasl_client_new. Be sure to release
these with sasl_dispose as documented in sasl.h. Likewise, let callers
(POP/IMAP) dispose the resource on their error paths. SMTP was already
taken care of. Found with LeakSanitizer in IMAP.

6 years agoEnsure a resized empty buffer is null-terminated
Kevin McCarthy [Wed, 17 Oct 2018 00:35:54 +0000 (17:35 -0700)]
Ensure a resized empty buffer is null-terminated

The new buffer code is using the pool, which ensures its buffers are
null-terminated.

However, if a "new" buffer from another part of the code were passed
to one of the temporary interfaces that resizes the buffer, it's
possible a non-terminated string might end up being passed through.

It's reasonable to expect mutt_b2s() for a "new" buffer should be the
same as after it is resized larger.  So ensure the resulting buf->data
is properly terminated to avoid surprises.

6 years agoRemove conversion of nbsp to space
Kevin McCarthy [Tue, 16 Oct 2018 23:04:57 +0000 (16:04 -0700)]
Remove conversion of nbsp to space

Keep the behavior of it not line-breaking, but don't change it to a
space character when displaying.  This is so copy-paste from the pager
will preserve the nbsp, which is semantically important in some
locales.

6 years agoadd Buffer fixup functions
Richard Russon [Mon, 26 Nov 2018 15:39:11 +0000 (15:39 +0000)]
add Buffer fixup functions

This is split out of another upstream commit

6 years agoAlways print mutt_buffer_pool_free() size debug output
Kevin McCarthy [Wed, 31 Oct 2018 19:19:56 +0000 (12:19 -0700)]
Always print mutt_buffer_pool_free() size debug output

So I can easily see the resulting size of the pool at the end of a
run.

6 years agoAdd mutt_buffer_adv_mktemp() transition function
Kevin McCarthy [Mon, 15 Oct 2018 02:02:47 +0000 (19:02 -0700)]
Add mutt_buffer_adv_mktemp() transition function

6 years agoAdd mutt_buffer_mktemp() transition function
Kevin McCarthy [Mon, 15 Oct 2018 01:36:08 +0000 (18:36 -0700)]
Add mutt_buffer_mktemp() transition function

This is self-contained and easy to translate, so instead just create
an alternate implementation using struct Buffer.

6 years agoclang-format
Richard Russon [Mon, 26 Nov 2018 11:00:28 +0000 (11:00 +0000)]
clang-format

6 years agoRename arguments of mutt_file_read_line for consistency
Ian Zimmerman [Sun, 25 Nov 2018 06:04:53 +0000 (22:04 -0800)]
Rename arguments of mutt_file_read_line for consistency

6 years agoAdd more convenient functions to map file lines
Ian Zimmerman [Thu, 22 Nov 2018 14:38:03 +0000 (06:38 -0800)]
Add more convenient functions to map file lines