]> granicus.if.org Git - neomutt/commit
Turn IMAP_EXPUNGE_EXPECTED back off when syncing. (closes #3940).
authorKevin McCarthy <kevin@8t8.us>
Fri, 12 May 2017 16:15:00 +0000 (09:15 -0700)
committerRichard Russon <rich@flatcap.org>
Thu, 18 May 2017 13:33:29 +0000 (14:33 +0100)
commit42eafa118322a9b432068c05245281fea974cbea
tree7689f25c213f6c923983689a996e6d6d23a743a7
parent1f286d23e6f8559071f19da0ff286f5f2e2ec8d3
Turn IMAP_EXPUNGE_EXPECTED back off when syncing. (closes #3940).

imap_sync_mailbox() turned on IMAP_EXPUNGE_EXPECTED when issuing a
EXPUNGE command during a sync.  However, it forgot to turn it back off.

That meant that an unexpected EXPUNGE that occurred during a
mx_check_mailbox -> imap_check_mailbox() -> imap_cmd_finish() call was
not setting
  idata->check_status = IMAP_EXPUNGE_PENDING;
and so imap_check_mailbox() was not returning MUTT_REOPENED.

This meant that although the Context had been changed, the index did
not run update_index(), resulting in a possible segfault.

Thanks to Uroš Juvan for reporting the issue, and his invaluable
description of how to reproduce the problem.
imap/imap.c