Wireshark-bugs: [Wireshark-bugs] [Bug 7233] tshark: support sequential reading from pipes

Date: Tue, 5 Jun 2012 09:12:35 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7233

--- Comment #4 from Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> 2012-06-05 09:12:35 PDT ---
(In reply to comment #3)
> Are there any cases where a *forward* seek could be done inside the buffer? 

You ask about this chunk (?):

-  if (file->compression == UNCOMPRESSED && file->pos + offset >= file->raw) {
+  if (file->compression == UNCOMPRESSED && file->pos + offset >= file->raw 
+     && (offset < 0 || offset >= file->have) /* seek only when we don't have
that offset in buffer */)
+       {

It happened few times during my tests.


Speaking of forward seek, we don't handle it well.
When ws_lseek64() failed with EISPIPE, and it's forward seek we should not
fail.
But skip it using gz_skip().

I never hit such case, but I have it in my TODOs.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.