From 29de5a48f882ff7ebc2b84ca52f7ac15bc6033d4 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Tue, 31 May 2022 23:47:52 +0000 Subject: [PATCH] community/marisa to 0.2.6-9 --- community/marisa/PKGBUILD | 11 ++++++++--- community/marisa/fix-format-security.patch | 22 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 community/marisa/fix-format-security.patch diff --git a/community/marisa/PKGBUILD b/community/marisa/PKGBUILD index 0b8d72f1f..0327419ed 100644 --- a/community/marisa/PKGBUILD +++ b/community/marisa/PKGBUILD @@ -7,17 +7,22 @@ pkgbase=marisa pkgname=('marisa' 'perl-marisa' 'python-marisa' 'ruby-marisa') pkgver=0.2.6 -pkgrel=8 +pkgrel=9 arch=('x86_64') url="https://github.com/s-yata/marisa-trie" license=('BSD' 'LGPL') makedepends=('python' 'ruby' 'perl' 'swig') -source=("marisa-trie-$pkgver.tar.gz::https://github.com/s-yata/marisa-trie/archive/v$pkgver.tar.gz") -sha512sums=('c094e4b22e1457efdd20f2b978ee421b53e36ed94e4fdbd8944136c0ba23da4f6ba9fe3a2c64729c1426aee4dbe8098bfa5eebb943ae7fdaa4eec760485c564d') +source=("marisa-trie-$pkgver.tar.gz::https://github.com/s-yata/marisa-trie/archive/v$pkgver.tar.gz" + fix-format-security.patch) +sha512sums=('c094e4b22e1457efdd20f2b978ee421b53e36ed94e4fdbd8944136c0ba23da4f6ba9fe3a2c64729c1426aee4dbe8098bfa5eebb943ae7fdaa4eec760485c564d' + '3583f23c55ccd46cefbd757ef3f82dc7a90f14c64ecf69a99ab3467ca1e6aeddf9822be4c4dffcdbb8841d79fe116cfb8eff0e9b44abaadbcbf8d50a10ab1ec9') prepare() { cd marisa-trie-$pkgver autoreconf -i + + # https://github.com/s-yata/marisa-trie/pull/45 + patch -Np1 -i ../fix-format-security.patch } build() { diff --git a/community/marisa/fix-format-security.patch b/community/marisa/fix-format-security.patch new file mode 100644 index 000000000..03f2f8630 --- /dev/null +++ b/community/marisa/fix-format-security.patch @@ -0,0 +1,22 @@ +From 5813d3b189512202b698aa4851e21b382acd003b Mon Sep 17 00:00:00 2001 +From: Xeonacid +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 + +