address buffer overrun when dict listx file has no trailling newline

See ar_listx as an example.
This commit is contained in:
Reef Turner
2017-07-25 14:29:45 +08:00
parent fb97d1bd75
commit 0994206f71
+2 -2
View File
@@ -411,8 +411,8 @@ static int compile_line(char *linebuf, char *dict_line, int n_dict_line, int *ha
step = LINE_PARSER_WORD;
c = 0;
while (c != '\n') {
c = *p;
while (c != '\n' && c != '\0') {
c = *p;
if ((c == '?') && (step == 0)) {