bug#3474: 23.0.94; Emacs.app crashes during typing (with patch)
Wolfgang Lux <[email protected]>
| Newsgroups | gmane.emacs.bugs,gmane.emacs.pretest.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please write in English if possible, because the Emacs maintainers usually do not have translators to read other languages for them. Your bug report will be posted to the [email protected] mailing list. Please describe exactly what actions triggered the bug and the precise symptoms of the bug: I've encountered a few crashes in Emacs.app, which happened while typing when Emacs was a bit busy. It turns out that these crashes were due to an omitted null-pointer check at line 4165 of keyboard.c in function kbd_buffer_get_event(). The attached patch fixes this problem along with a second omitted null-pointer check in line 4323 of the same function. Wolfgang
keyboard.patch
(application/octet-stream, 604 B)
--- src/keyboard.c.~1.1005.~ 2009-05-28 17:08:04.000000000 +0200
+++ src/keyboard.c 2009-06-02 13:39:39.000000000 +0200
@@ -4162,7 +4162,8 @@
else
obj = Fcons (intern ("ns-unput-working-text"), Qnil);
kbd_fetch_ptr = event + 1;
- *used_mouse_menu = 1;
+ if (used_mouse_menu)
+ *used_mouse_menu = 1;
}
#endif
@@ -4319,7 +4320,8 @@
#endif
#ifdef HAVE_NS
/* certain system events are non-key events */
- if (event->kind == NS_NONKEY_EVENT)
+ if (used_mouse_menu
+ && event->kind == NS_NONKEY_EVENT)
*used_mouse_menu = 1;
#endif