SECURITY fix for CVE-2018-12085:
check index before writing to result->chars While here, configure with --enable-ucs4 to unbreak python3 bindings (reported by Mike Burns, thanks!)
This commit is contained in:
parent
34aa917521
commit
d10b8746cf
@ -1,9 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.24 2018/06/23 17:52:25 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.25 2018/08/19 07:54:04 ajacoutot Exp $
|
||||
|
||||
COMMENT= braille translator, back-translator and formatter
|
||||
|
||||
V= 3.6.0
|
||||
DISTNAME= liblouis-${V}
|
||||
REVISION= 0
|
||||
|
||||
SHARED_LIBS += louis 7.2 # 16.0
|
||||
|
||||
@ -26,7 +27,8 @@ MODPY_ADJ_FILES=tools/lou_harnessGenerator
|
||||
BUILD_DEPENDS= devel/help2man
|
||||
|
||||
CONFIGURE_STYLE=gnu
|
||||
CONFIGURE_ARGS= --with-packager="OpenBSD Ports"
|
||||
CONFIGURE_ARGS= --with-packager="OpenBSD Ports" \
|
||||
--enable-ucs4
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${WRKINST}/${MODPY_SITEPKG}/louis
|
||||
|
@ -0,0 +1,23 @@
|
||||
$OpenBSD: patch-liblouis_compileTranslationTable_c,v 1.1 2018/08/19 07:54:04 ajacoutot Exp $
|
||||
|
||||
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
|
||||
|
||||
Index: liblouis/compileTranslationTable.c
|
||||
--- liblouis/compileTranslationTable.c.orig
|
||||
+++ liblouis/compileTranslationTable.c
|
||||
@@ -1127,11 +1127,11 @@ parseChars(FileInfo *nested, CharsString *result, Char
|
||||
}
|
||||
in++;
|
||||
}
|
||||
- result->chars[out++] = (widechar)ch;
|
||||
if (out >= MAXSTRING) {
|
||||
result->length = out;
|
||||
return 1;
|
||||
}
|
||||
+ result->chars[out++] = (widechar)ch;
|
||||
continue;
|
||||
}
|
||||
lastOutSize = out;
|
Loading…
x
Reference in New Issue
Block a user