Wireshark-bugs: [Wireshark-bugs] [Bug 7453] New: CID 280531: "Argument cannot be negative" in le
Date: Sun, 8 Jul 2012 12:04:02 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7453

           Summary: CID 280531: "Argument cannot be negative" in lemon
           Product: Wireshark
           Version: unspecified
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Extras
        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,

CID 280531 complains about

filesize=ftell(fp);
...
fread(..., filesize, ...);

where the size parameter in fread() must be positive and the return value of
ftell() can be negative.

I'll attach a simple patch to check ftell's return value. If you think this CID
should be fixed, please merge it.

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.