Closed op8867555 closed 1 year ago
Hi, This example was indeed incomplete, and was missing the code to handle incomplete blocks.
This is a duplicate of #18 and fixed in b4a526f3404380f63624ef862c95450a8571e6e7 (see these links for complete examples). Closing this issue as it is now fixed.
Hi, I followed the example and found out that a truncated packet will make the example parser stuck in an infinite loop, since:
PcapReaderIterator.refill()
always returnOk
even if the reader is exhausted, andPcapReaderIterator.next()
won't return EOF because there are still data available.My current workaround is checking
reader_exhausted()
after everyrefill()
calls.Is this behavior expected or a bug?