Compare commits

...

1 Commits

Author SHA1 Message Date
pixeebot[bot]
7879dd3aac
Limit readline() 2024-04-16 04:51:38 +00:00

View File

@ -30,7 +30,7 @@ class ParseZeekLogs(object):
meta = loads(dumps(meta).replace("'", '"')) meta = loads(dumps(meta).replace("'", '"'))
# Read the header option lines # Read the header option lines
l = self.fd.readline().strip() l = self.fd.readline(5_000_000).strip()
while l.strip().startswith("#"): while l.strip().startswith("#"):
# Parse the options out # Parse the options out
if l.startswith("#separator"): if l.startswith("#separator"):
@ -44,7 +44,7 @@ class ParseZeekLogs(object):
self.options[key] = value self.options[key] = value
# Read the next line # Read the next line
l = self.fd.readline().strip() l = self.fd.readline(5_000_000).strip()
self.firstLine = l self.firstLine = l