]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[menu] Prevent character code zero from acting as a shortcut key
authorMichael Brown <mcb30@ipxe.org>
Wed, 6 Mar 2013 14:41:46 +0000 (14:41 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 6 Mar 2013 14:41:46 +0000 (14:41 +0000)
commitb8cbdbbb53512ff35515b3da78b8451b6b8906ae
treeaa582cdaacc7a1a02db5a6653d8a3feef94b6233
parenteb5a2ba5962579e514b377f5fdab7292be0fb2a7
[menu] Prevent character code zero from acting as a shortcut key

Unrecognised keys may be returned by getkey() as character code zero,
which currently matches against the first menu item with no shortcut
key defined.

Prevent this unintended behaviour by explicitly checking that the menu
item has a defined shortcut key.

Reported-by: Ján ONDREJ (SAL) <ondrejj@salstar.sk>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/hci/tui/menu_ui.c