From 67833146728b0c2ced72fc90d8c871d468461d6f Mon Sep 17 00:00:00 2001 From: maxice8 Date: Tue, 2 Oct 2018 09:28:47 -0300 Subject: [PATCH] liblouis: fix CVE-2018-12085 --- srcpkgs/liblouis/patches/CVE-2018-12085.patch | 27 +++++++++++++++++++ srcpkgs/liblouis/template | 3 ++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/liblouis/patches/CVE-2018-12085.patch diff --git a/srcpkgs/liblouis/patches/CVE-2018-12085.patch b/srcpkgs/liblouis/patches/CVE-2018-12085.patch new file mode 100644 index 00000000000..3d6c74c4964 --- /dev/null +++ b/srcpkgs/liblouis/patches/CVE-2018-12085.patch @@ -0,0 +1,27 @@ +From dbfa58bb128cae86729578ac596056b3385817ef Mon Sep 17 00:00:00 2001 +From: Christian Egli +Date: Wed, 6 Jun 2018 16:41:53 +0200 +Subject: [PATCH] Check index before writing to result->chars + +Fixes #595 +--- + liblouis/compileTranslationTable.c | 2 +- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/liblouis/compileTranslationTable.c b/liblouis/compileTranslationTable.c +index e3ca96075..c02821214 100644 +--- a/liblouis/compileTranslationTable.c ++++ b/liblouis/compileTranslationTable.c +@@ -1127,11 +1127,11 @@ parseChars(FileInfo *nested, CharsString *result, CharsString *token) { + } + in++; + } +- result->chars[out++] = (widechar)ch; + if (out >= MAXSTRING) { + result->length = out; + return 1; + } ++ result->chars[out++] = (widechar)ch; + continue; + } + lastOutSize = out; diff --git a/srcpkgs/liblouis/template b/srcpkgs/liblouis/template index 3da2bca8bb8..475051e298b 100644 --- a/srcpkgs/liblouis/template +++ b/srcpkgs/liblouis/template @@ -1,7 +1,8 @@ # Template file for 'liblouis' pkgname=liblouis version=3.6.0 -revision=1 +revision=2 +patch_args="-Np1" build_style=gnu-configure configure_args="--enable-ucs4" pycompile_module="louis"