1. 03 Mar, 2018 1 commit
  2. 28 Feb, 2018 2 commits
  3. 27 Feb, 2018 1 commit
  4. 22 Feb, 2018 2 commits
    • Kevin J. McCarthy's avatar
      Fix is_from() year parsing to abort on year overflow. · 2a857f63
      Kevin J. McCarthy authored
      Unlike mutt_parse_date(), is_from() was not checking for overflow, and
      could end up passing a negative year to mutt_mktime().
      It should perhaps be changed to use mutt_atoi(), which does better
      range checking, but that requires mutt_atoi() being changed to allow
      trailing characters and its callers return value checks being
      updated.  I'll put that on the todo list.
    • Kevin J. McCarthy's avatar
      Cap parsed years at 9999 when converting to time_t. · 189e52d5
      Kevin J. McCarthy authored
      Large year values, even those less than INT_MAX, apparently can cause
      gmtime() and localtime() to return NULL.  Mutt needs larger changes
      checking and handling those errors, but this will prevent the
      immediately triggerable issue.
  5. 01 Feb, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Add stub flea and muttbug scripts back. · b2dbdce0
      Kevin J. McCarthy authored
      It was rightfully pointed out that the removal was too abrupt.  These
      programs have been around for a long time, and many internet searches
      still say to use them for reporting bugs.
      Add stub versions which inform to use the gitlab url instead.
  6. 31 Jan, 2018 2 commits
  7. 27 Jan, 2018 1 commit
  8. 22 Jan, 2018 1 commit
  9. 18 Jan, 2018 6 commits
  10. 11 Jan, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Add missing setup calls when resuming encrypted drafts. · 667a4710
      Kevin J. McCarthy authored
      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.
  11. 07 Jan, 2018 1 commit
    • Kevin J. McCarthy's avatar
      Fix imap status count range check. · a37a2c4d
      Kevin J. McCarthy authored
      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!
  12. 06 Jan, 2018 2 commits
    • Kevin J. McCarthy's avatar
      Change imap literal counts to parse and store unsigned ints. · 8fcf8eda
      Kevin J. McCarthy authored
      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.
    • Kevin J. McCarthy's avatar
      Fix improper signed int conversion of IMAP uid and msn values. · b8190ef3
      Kevin J. McCarthy authored
      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.
  13. 26 Dec, 2017 1 commit
  14. 18 Dec, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Determine latest tag using git describe. · 80d06b0c
      Kevin J. McCarthy authored
      Commit 8648db83 relies on `sort -V` which is unavailable on some
      platforms.  Instead just use `git describe` with --abbrev=0 to only
      output the tag.  We still manually compute the distance to avoid the
      problem mentioned in that commit.
      Additionally, add Vincent's fix from commit 3b142cea to the stable
  15. 15 Dec, 2017 3 commits
    • Kevin J. McCarthy's avatar
    • Kevin J. McCarthy's avatar
      Fix s/mime certificate deletion bug. (closes #3982) · 9eedfd4e
      Kevin J. McCarthy authored
      Commit c1bcf4ba exposed a bug in the s/mime encryption code.  It was
      errorneously calling unlink on the list of generated cert files to
      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.
    • Kevin J. McCarthy's avatar
      Update mkchangelog.sh to use git. · 841f7101
      Kevin J. McCarthy authored
      The output isn't quite as nice as the hg generated version, but is
      With Mercurial, and now Git, I'm not sure of the usefulness of
      maintaining a ChangeLog file in the repos, but that is another
  16. 13 Dec, 2017 3 commits
  17. 11 Dec, 2017 1 commit
  18. 04 Dec, 2017 1 commit
  19. 03 Dec, 2017 1 commit
  20. 01 Oct, 2017 1 commit
  21. 27 Sep, 2017 1 commit
    • Kevin J. McCarthy's avatar
      Fix uses of context->changed as a counter. · 0bcb77a6
      Kevin J. McCarthy authored
      The first was in mx_update_tables(), but only when "not committing".
      This is used by mh/maildir during an "occult" update, and in imap when
      expunging the mailbox.  It meant to simply turn on changed when a
      single changed header is seen.
      The second use was in imap_sync_message_for_copy().  Previously this
      was used for a server side copy/save, but is now also used for
      fast-trash copying.  Remove the code that was trying to decrement the
      counter: this function is not capable of properly setting a status
  22. 23 Sep, 2017 3 commits
  23. 22 Sep, 2017 3 commits
    • Kevin J. McCarthy's avatar
      Add missing IMAP_CMD_POLL flag in imap buffy check. · 4c961065
      Kevin J. McCarthy authored
      I missed adding the flag to one of the imap_exec() calls inside the
      loop, when a different server is encountered in the mailboxes list.
    • Kevin J. McCarthy's avatar
      Close the imap socket for the selected mailbox on error. · 1eab7774
      Kevin J. McCarthy authored
      The new $imap_poll_timeout calls the cmd_handle_fatal() error handler
      on timeout, which is supposed to close and cleanup.
      However, for the currently selected mailbox, the error handler was not
      closing the socket after closing up the mailbox.  This left extra
      SSL/GnuTLS data around and was causing errors on an attempt to
      Thanks to Fabian Groffen for reporting the issue.
    • Kevin J. McCarthy's avatar
      Fix imap sync segfault due to inactive headers during an expunge. (closes #3971) · a4dbae76
      Kevin J. McCarthy authored
      Mutt has several places where it turns off h->active as a hack.  For
      example to avoid FLAG updates, or to exclude from imap_exec_msgset.
      Unfortunately, when a reopen is allowed and the IMAP_EXPUNGE_PENDING
      flag becomes set (e.g. a flag update to a modified header),
      imap_expunge_mailbox() will be called by imap_cmd_finish().
      The mx_update_tables() would free and remove these "inactive" headers,
      despite that an EXPUNGE was not received for them.  This would result
      in memory leaks and segfaults due to dangling pointers in the
      msn_index and uid_hash.
      There should probably be a more elegant solution, removing the initial
      hacks.  However, this is causing a segfault, and the best solution
      right now is to turn active back on for non-expunged messages in
      Extra thanks to chdiza, who bravely runs tip and found this issue