liblouis: fix CVE-2018-12085

This commit is contained in:
maxice8 2018-10-02 09:28:47 -03:00 committed by maxice8
parent d385dc4a6b
commit 6783314672
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From dbfa58bb128cae86729578ac596056b3385817ef Mon Sep 17 00:00:00 2001
From: Christian Egli <christian.egli@sbs.ch>
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;

View File

@ -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"