emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/rec-mode b77d494 30/98: rec-mode: avoid security proble


From: Stefan Monnier
Subject: [elpa] externals/rec-mode b77d494 30/98: rec-mode: avoid security problems in calls to message by using %s.
Date: Thu, 12 Nov 2020 13:18:34 -0500 (EST)

branch: externals/rec-mode
commit b77d494d383a94aadf274028a3afb516980f8209
Author: Jose E. Marchesi <jemarch@gnu.org>
Commit: Antoine Kalmbach <ane@iki.fi>

    rec-mode: avoid security problems in calls to message by using %s.
---
 etc/rec-mode.el | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/etc/rec-mode.el b/etc/rec-mode.el
index 6bfbde5..b0438cd 100644
--- a/etc/rec-mode.el
+++ b/etc/rec-mode.el
@@ -1364,8 +1364,8 @@ file.  Interactive version."
         (rec-goto-next-rec)
       (if (not (rec-record-type))
           (message "No more records")
-        (message (concat "No more records of type "
-                         (rec-record-type))))))
+        (message "%s" (concat "No more records of type "
+                              (rec-record-type))))))
   (unless rec-editing
     (rec-show-record)))
 
@@ -1382,8 +1382,8 @@ the file.  Interactive version."
         (rec-goto-previous-rec)
       (if (not (rec-record-type))
           (message "No more records")
-        (message (concat "No more records of type "
-                         (rec-record-type))))))
+        (message "%s" (concat "No more records of type "
+                              (rec-record-type))))))
   (unless rec-editing
     (rec-show-record)))
 
@@ -1477,7 +1477,7 @@ the modeline."
   (interactive)
   (let ((type (rec-current-field-type)))
     (if type
-        (message (rec-type-text type))
+        (message "%s" (rec-type-text type))
       (message "Unrestricted text"))))
 
 (defun rec-cmd-count ()
@@ -1486,11 +1486,11 @@ records of the current type"
   (interactive)
   (message "Counting records...")
   (let ((type (rec-record-type)))
-    (message (concat (number-to-string (rec-count type))
-                     (if (or (not type)
-                             (equal type ""))
-                         " records"
-                       (concat " records of type " type))))))
+    (message "%s" (concat (number-to-string (rec-count type))
+                          (if (or (not type)
+                                  (equal type ""))
+                              " records"
+                            (concat " records of type " type))))))
 
 (defun rec-cmd-append-field ()
   "Goto the end of the record and switch to edit record mode."
@@ -1549,7 +1549,7 @@ records of the current type"
     ;; Show the message.
     (setq msg (replace-regexp-in-string "\n$" "" msg))
     (setq msg (replace-regexp-in-string "\n" ", " msg))
-    (message msg)))
+    (message "%s" msg)))
 
 (defun rec-cmd-beginning-of-line ()
   "Move the point to the beginning of the current line.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]