Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-bugs: [Wireshark-bugs] [Bug 2067] New: mergecap fails when "time_t" is "int"

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: bugzilla-daemon@xxxxxxxxxxxxx
Date: Sun, 2 Dec 2007 21:19:07 +0000 (GMT)

http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2067

           Summary: mergecap fails when "time_t" is "int"
           Product: Wireshark
           Version: SVN
          Platform: PC
        OS/Version: OpenBSD
            Status: NEW
          Severity: Minor
          Priority: Low
         Component: Extras
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: nikns@xxxxxxxxx


Build Information:

--
When "time_t" is "int" (for example on OpenBSD), mergecap fails because of:

-----------merge.c-------------------------
[..]
wtap* merge_read_packet(..) 
{
struct wtap_nstime tv = {LONG_MAX, LONG_MAX};
}
[..]
-----------wiretap/wtap.h------------------
[..]
struct wtap_nstime {
        time_t  secs;
        int     nsecs;
};
[..]
--------------------------------------------

As you see, if "time_t" is "int", "LONG_MAX" assignation overflows "tv" value.

The solution would be to make "wtap_nstime" element "secs" of type "int" and to
"tv" assign INT_MAX.


-- 
Configure bugmail: http://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

  • Follow-Ups:
    • [Wireshark-bugs] [Bug 2067] mergecap fails when "time_t" is "int"
      • From: bugzilla-daemon
    • [Wireshark-bugs] [Bug 2067] mergecap fails when "time_t" is "int"
      • From: bugzilla-daemon
    • [Wireshark-bugs] [Bug 2067] mergecap fails when "time_t" is "int"
      • From: bugzilla-daemon
    • [Wireshark-bugs] [Bug 2067] mergecap fails when "time_t" is "int"
      • From: bugzilla-daemon
  • Prev by Date: [Wireshark-bugs] [Bug 2065] configure warnings_as_errors_default fix
  • Next by Date: [Wireshark-bugs] [Bug 2017] VoIP trace crashes Wireshark when specific RTP Player buttons are clicked
  • Previous by thread: [Wireshark-bugs] [Bug 2066] Crash after using any Wireshark Combo Box (gtk_combo)
  • Next by thread: [Wireshark-bugs] [Bug 2067] mergecap fails when "time_t" is "int"
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation