Mercurial > emacs
changeset 2436:80aafda1127b
* keyboard.c (parse_modifiers, apply_modifiers): Make sure we're
not trying to create modifier masks using integers which are
unrepresentable as lisp values.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 31 Mar 1993 07:19:25 +0000 |
parents | b72453ad92ae |
children | 290a7be0d392 |
files | src/keyboard.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Wed Mar 31 07:05:20 1993 +0000 +++ b/src/keyboard.c Wed Mar 31 07:19:25 1993 +0000 @@ -2485,6 +2485,8 @@ Qnil); Lisp_Object mask; + if (modifiers & ~((1<<VALBITS) - 1)) + abort (); XFASTINT (mask) = modifiers; elements = Fcons (unmodified, Fcons (mask, Qnil)); @@ -2521,6 +2523,8 @@ /* The click modifier never figures into cache indices. */ cache = Fget (base, Qmodifier_cache); + if (index & ~((1<<VALBITS) - 1)) + abort (); XFASTINT (index) = (modifiers & ~click_modifier); entry = Fassq (index, cache); @@ -2538,6 +2542,8 @@ Fput (base, Qmodifier_cache, Fcons (entry, cache)); /* We have the parsing info now for free, so add it to the caches. */ + if (modifiers & ~((1<<VALBITS) - 1)) + abort (); XFASTINT (index) = modifiers; Fput (new_symbol, Qevent_symbol_element_mask, Fcons (base, Fcons (index, Qnil)));