]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fsingle_key_description): NUL-terminate the string
authorGerd Moellmann <gerd@gnu.org>
Tue, 29 May 2001 14:09:54 +0000 (14:09 +0000)
committerGerd Moellmann <gerd@gnu.org>
Tue, 29 May 2001 14:09:54 +0000 (14:09 +0000)
buffer before calling build_string.

src/ChangeLog
src/keymap.c

index 9c80466e78764c891ac2225cdc3e1365a75cc48c..a0c3c451e9fe8a96349e69724be6377ed44374ce 100644 (file)
@@ -1,5 +1,8 @@
 2001-05-29  Gerd Moellmann  <gerd@gnu.org>
 
+       * keymap.c (Fsingle_key_description): NUL-terminate the string
+       buffer before calling build_string.
+
        * callproc.c (Fcall_process): Deal with decode_coding returning
        CODING_FINISH_INCONSISTENT_EOL.
 
index f96c109c9cd2a188cc879d6dbf3f3a07e92a21f9..5da93ee89f03029d23235c7c81e3f9cc6bf2239c 100644 (file)
@@ -1967,7 +1967,10 @@ around function keys and event symbols.")
          nbytes = end - tem;
          nchars = multibyte_chars_in_text (tem, nbytes);
          if (nchars == nbytes)
-           string = build_string (tem);
+           {
+             *end = '\0';
+             string = build_string (tem);
+           }
          else
            string = make_multibyte_string (tem, nchars, nbytes);
          return string;