commit | 9e49ec6cd325bf521f63450f3f87525cb82c63a9 | [log] [download] |
---|---|---|
author | Nicholas Marriott <nicm@openbsd.org> | Sun Jul 12 17:33:18 2009 +0000 |
committer | Nicholas Marriott <nicm@openbsd.org> | Sun Jul 12 17:33:18 2009 +0000 |
tree | 4cf932e9c428397f629bc82c9f136ded16ac006d | |
parent | 22d51ec1ead8077f9528727db56e54e997da1775 [diff] |
Creating a key binding which replaces itself (such as "bind x bind x lsw") frees the command list bound to the key while it is still being executed, leading to a use after free. To prevent this, create a dead keys list and defer freeing replaced or removed key bindings until the main loop when the key binding will have finished executing. Found by Johan Friis when creating a key binding to reload his configuration file.