Permalink
Browse files

Check index before writing to result->chars

Fixes #595
  • Loading branch information...
egli committed Jun 6, 2018
1 parent 575dae3 commit dbfa58bb128cae86729578ac596056b3385817ef
Showing with 3 additions and 1 deletion.
  1. +2 −0 NEWS
  2. +1 −1 liblouis/compileTranslationTable.c
2 NEWS
@@ -6,6 +6,8 @@ issues]].
** New features
** Bug fixes
- Fix another stack-based buffer overflow in input parsing reported by
Henri Salo thanks to Christian Egli.
** Braille table improvements
** Other changes
** Deprecation notice
@@ -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;

0 comments on commit dbfa58b

Please sign in to comment.