commit fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
Author: Christian Egli <christian.egli@sbs.ch>
Date:   Mon Jun 4 14:11:50 2018 +0200

    Fix yet another buffer overflow in the braille table parser
    
    Reported by Henri Salo
    
    Fixes #592

diff --git a/liblouis/compileTranslationTable.c b/liblouis/compileTranslationTable.c
index b6577c7c..3e0c3c39 100644
--- a/liblouis/compileTranslationTable.c
+++ b/liblouis/compileTranslationTable.c
@@ -4557,6 +4557,10 @@ includeFile(FileInfo *nested, CharsString *includedFile,
 	int rv;
 	for (k = 0; k < includedFile->length; k++)
 		includeThis[k] = (char)includedFile->chars[k];
+	if (k >= MAXSTRING) {
+		compileError(nested, "Include statement too long: 'include %s'", includeThis);
+		return 0;
+	}
 	includeThis[k] = 0;
 	tableFiles = _lou_resolveTable(includeThis, nested->fileName);
 	if (tableFiles == NULL) {
@@ -4564,9 +4568,8 @@ includeFile(FileInfo *nested, CharsString *includedFile,
 		return 0;
 	}
 	if (tableFiles[1] != NULL) {
-		errorCount++;
 		free_tablefiles(tableFiles);
-		_lou_logMessage(LOG_ERROR,
+		compileError(nested,
 				"Table list not supported in include statement: 'include %s'",
 				includeThis);
 		return 0;
