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

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

[elpa] master 2604297 1/4: Don't use error report as format


From: Artur Malabarba
Subject: [elpa] master 2604297 1/4: Don't use error report as format
Date: Thu, 17 Nov 2016 13:04:51 +0000 (UTC)

branch: master
commit 26042970870ad38b1023a622e28837a4c7aac574
Author: Sebastian Wiesner <address@hidden>
Commit: GitHub <address@hidden>

    Don't use error report as format
    
    The second argument of "user-error" is a format string; we must not pass an 
arbitrary string in this place.
    
    If a bad value contains a percentage sign, it'll end up in a "format" 
position through "report", causing a second failure about missing format 
arguments which masks the original error.
    
    To prevent this use an explicit format and pass the "report" as format 
string argument.
---
 validate.el |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validate.el b/validate.el
index 362d38c..398a169 100644
--- a/validate.el
+++ b/validate.el
@@ -165,7 +165,7 @@ indicate a failure."
   (let ((report (validate--check value schema)))
     (if report
         (unless noerror
-          (user-error report))
+          (user-error "%s" report))
       value)))
 
 ;;;###autoload



reply via email to

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