From: Juanma Barranquero Date: Fri, 7 Feb 2014 11:13:31 +0000 (+0100) Subject: * lisp/simple.el (quoted-insert): Check character validity (bug#16677). X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~128 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e255a703761c1a10b6363ebb617ce89605b9062b;p=emacs.git * lisp/simple.el (quoted-insert): Check character validity (bug#16677). --- 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)))