From a53fe666c2586f52be26b7a3e55b28f3b1a2f9fa Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 13 Apr 2006 01:25:52 +0000 Subject: [PATCH] (read_key_sequence): Explicitly avoid keybuf[-1]. --- src/ChangeLog | 2 ++ src/keyboard.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index a4251651bda..71b7dde96b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -5,6 +5,8 @@ 2006-04-12 Richard Stallman + * keyboard.c (read_key_sequence): Explicitly avoid keybuf[-1]. + * process.c (conv_lisp_to_sockaddr): If FAMILY unknown, just return. (Fprocess_send_eof): Abort if fail to open null device. diff --git a/src/keyboard.c b/src/keyboard.c index 60ad54eac7e..1aca0127763 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1418,7 +1418,7 @@ command_loop_1 () Lisp_Object keybuf[30]; int i; int no_direct; - int prev_modiff; + int prev_modiff = 0; struct buffer *prev_buffer = NULL; #ifdef MULTI_KBOARD int was_locked = single_kboard; @@ -9479,6 +9479,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, /* Don't downcase the last character if the caller says don't. Don't downcase it if the result is undefined, either. */ if ((dont_downcase_last || first_binding >= nmaps) + && t > 0 && t - 1 == original_uppercase_position) keybuf[t - 1] = original_uppercase; -- 2.11.4.GIT