PKGBUILDs/community/marisa/fix-format-security.patch
2022-05-31 23:48:43 +00:00

22 lines
910 B
Diff

From 5813d3b189512202b698aa4851e21b382acd003b Mon Sep 17 00:00:00 2001
From: Xeonacid <h.dwwwwww@gmail.com>
Date: Sat, 5 Feb 2022 08:51:43 +0800
Subject: [PATCH] Fix format security
---
bindings/ruby/marisa-swig_wrap.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bindings/ruby/marisa-swig_wrap.cxx b/bindings/ruby/marisa-swig_wrap.cxx
index eae2304..ddc346d 100644
--- a/bindings/ruby/marisa-swig_wrap.cxx
+++ b/bindings/ruby/marisa-swig_wrap.cxx
@@ -1402,7 +1402,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
/* Error manipulation */
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
-#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
+#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
#define SWIG_fail goto fail