These two patches solve two different problems exposed in ticket #3799.

The first solves a segfault when none of the "(r)eject, accept
(o)nce, (a)ccept always" choices where chosen.  This is because
mutt_new_menu(-1) was called to create the dialog.  However, the "menu"
parameter, -1, is used as an index into Keymaps in several places,
causing the illegal memory access.

The second patch fixes a buffering issue.  The certificate acceptance
prompts turns on UNBUFFEREDINPUT, but the menu_dialog_dokey() uses the
unget buffer to forward non-dialog keys for normal menu processing!  The
patch separates out unget buffering from macro/push/exec buffering.

The second patch is somewhat invasive, so I'd appreciate feedback and
testing if possible.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
http://www.8t8.us/configs/gpg-key-transition-statement.txt

Attachment: signature.asc
Description: PGP signature

Reply via email to