mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
input/Raw: Rework GetLine()
This isn't a straightforward fix, unfortunately. The existing GetLine() implementation didn't deal well with input that's incrementally produced where individually read chunks wouldn't end with the separator. The prior implementation increased the buffer each time it failed to find a separator in the current buffer, but then also ended up not searching the full new buffer size for the terminator, doing that endlessly. This change reworks the Raw reader to rely only on bufpos for reading and searching purposes and skip reallocation if the buffer size if it wasn't actually exhausted. Closes #3957
This commit is contained in:
parent
4656faed6c
commit
ecfa03ea1d
10 changed files with 281 additions and 26 deletions
|
@ -0,0 +1,4 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
Input::EVENT_NEW, 24612, binary start\x00\x00\x00\x00, \x00\x00\x00\x00\x00binary done
|
||||
Input::EVENT_NEW, 3, ccc, ccc
|
||||
Input::EVENT_NEW, 5, final, final
|
Loading…
Add table
Add a link
Reference in a new issue