From e255a703761c1a10b6363ebb617ce89605b9062b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 7 Feb 2014 12:13:31 +0100 Subject: [PATCH] * lisp/simple.el (quoted-insert): Check character validity (bug#16677). --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 3 +++ 2 files changed, 7 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd1ad94af29..42d57a4ea7a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-02-07 Juanma Barranquero + + * simple.el (quoted-insert): Check character validity (bug#16677). + 2014-02-07 Juri Linkov * desktop.el (desktop-read): Claim the lock when the owner is not diff --git a/lisp/simple.el b/lisp/simple.el index f1955b58500..124e04fd0c0 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -738,6 +738,9 @@ useful for editing binary files." ;; (>= char ?\240) ;; (<= char ?\377)) ;; (setq char (unibyte-char-to-multibyte char))) + (unless (characterp char) + (user-error "%s is not a valid character" + (key-description (vector char)))) (if (> arg 0) (if (eq overwrite-mode 'overwrite-mode-binary) (delete-char arg))) -- 2.39.2