Fixed possible buffer over-read for certain log-format patterns.
This could occur if there were inconsistencies between lines having some
fields and while other lines not. e.g.,
192.168.1.2|Thu 28 Jan 2021 07:33:31 -0500|200|1092|GET /fossil/roundup_sysadmin/chat-poll?name=67 HTTP/1.1|https://me.example.com/chat|Mozilla/5.0|Host: me.example.com|Connection: keep-alive|Accept
10.10.73.242|Thu 28 Jan 2021 07:33:42 -0500|404|957|GET /login HTTP/1.0||
Fixes
@@ -1699,6 +1699,8 @@ parse_format (GLogItem * logitem, char *str, char *lfmt) {
tilde++;
continue;
}
+ if (*str == '\n')
+ return 0;
if (tilde && *p != '\0') {
if ((str == NULL) || (*str == '\0'))
