liblouis/liblouis-cve-2018-12085.patch
Petr Šabata ef9d0d53b8 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/liblouis#990a0863ff4ec18451e83057db25aeb608e43b6a
2020-10-15 16:30:19 +02:00

26 lines
748 B
Diff

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
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;