Wireshark-bugs: [Wireshark-bugs] [Bug 6909] New: wiretap mpeg2 ts: eof vs short read

Date: Sun, 4 Mar 2012 09:05:59 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6909

           Summary: wiretap mpeg2 ts: eof vs short read
           Product: Wireshark
           Version: SVN
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Low
         Component: Wireshark
        AssignedTo: bugzilla-admin@xxxxxxxxxxxxx
        ReportedBy: wireshark@xxxxxxxxx


Build Information:
Paste the COMPLETE build information from "Help->About Wireshark", "wireshark
-v", or "tshark -v".
--

Dear all,

when I load an mpeg2 ts file, I always get an error pop up saying the last
packet is incomplete, even when the file has N*188 bytes.

For N*188 bytes, mp2t_read_data() is called N+1 times, reading 0 bytes the last
time. It then sets *err=WTAP_ERR_SHORT_READ. I understand that getting 0 bytes
is not a short read but the end of file. If I ask for 188 bytes and get
0<x<188, it's a short read.

The attached patch corrects this.

You can use the files attached to #6908 to test it. The 8.xxPackets... should
bring up the error popup, the others shouldn't.

Best regards,

   Martin

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