summaryrefslogtreecommitdiff
path: root/lisp/net/rcirc.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-03-07 09:02:15 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2019-03-07 09:05:56 -0800
commit3739d51ef3b935b30e40ba4534fe362bc685865f (patch)
treeada093c6c9464828035b59a9f56f90a367b57d3a /lisp/net/rcirc.el
parent953cbce77be9a8da1cbf0ca5ee6442923478e186 (diff)
downloademacs-3739d51ef3b935b30e40ba4534fe362bc685865f.tar.gz
Be safer about "%" in message formats
* lisp/calc/calc-store.el (calc-copy-special-constant): * lisp/net/rcirc.el (rcirc-handler-PART, rcirc-handler-KICK): * lisp/org/org-agenda.el (org-agenda): * lisp/org/org-clock.el (org-clock-out, org-clock-display): * lisp/org/org.el (org-refile): * lisp/progmodes/ada-xref.el (ada-goto-declaration): * lisp/progmodes/idlwave.el (idlwave-scan-library-catalogs): Don’t trust arbitrary strings to not contain "%" or "`" in (message (concat STRING1 STRING2 ...)).
Diffstat (limited to 'lisp/net/rcirc.el')
-rw-r--r--lisp/net/rcirc.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index b1a6c1ce8d2..9d53cd4436b 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2685,7 +2685,7 @@ the only argument."
(defun rcirc-handler-PART (process sender args _text)
(let* ((channel (car args))
(reason (cadr args))
- (message (concat channel " " reason)))
+ (message "%s %s" channel reason))
(rcirc-print process sender "PART" channel message)
;; print in private chat buffer if it exists
(when (rcirc-get-buffer (rcirc-buffer-process) sender)
@@ -2697,7 +2697,7 @@ the only argument."
(let* ((channel (car args))
(nick (cadr args))
(reason (nth 2 args))
- (message (concat nick " " channel " " reason)))
+ (message "%s %s %s" nick channel reason))
(rcirc-print process sender "KICK" channel message t)
;; print in private chat buffer if it exists
(when (rcirc-get-buffer (rcirc-buffer-process) nick)