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 2518] 'tshark -Tfields -e data' Omits Last Character of Data

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


From: bugzilla-daemon@xxxxxxxxxxxxx
Date: Sat, 3 May 2008 13:36:09 -0700 (PDT)

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


Alon Tal <alon@xxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #1768|                            |review_for_checkin?
               Flag|                            |




--- Comment #1 from Alon Tal <alon@xxxxxxxxxxx>  2008-05-03 13:36:08 GMT ---
Created an attachment (id=1768)
 --> (http://bugs.wireshark.org/bugzilla/attachment.cgi?id=1768)
Fix for Missing Char in Output of 'tshark -Tfields -e data'

The 'len' variable was set to a too-low value. 
This variable is provided as the 2nd parameter (Target buffer size) to
g_snprintf(), and is decremented as bytes are written to the target array
('buffer').
The bug occurs when the loop reaches the final byte -- at that point, len==2,
which is insufficient for the hex-string representation + terminated null: 3
bytes are required.
Fixed by changing the calculation of 'len' so that it represents the actual
storage needed, including the terminating null.


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

  • References:
    • [Wireshark-bugs] [Bug 2518] New: 'tshark -Tfields -e data' Omits Last Character of Data
      • From: bugzilla-daemon
  • Prev by Date: [Wireshark-bugs] [Bug 2518] 'tshark -Tfields -e data' Omits Last Character of Data
  • Next by Date: [Wireshark-bugs] [Bug 2518] 'tshark -Tfields -e data' Omits Last Character of Data
  • Previous by thread: [Wireshark-bugs] [Bug 2518] 'tshark -Tfields -e data' Omits Last Character of Data
  • Next by thread: [Wireshark-bugs] [Bug 2518] 'tshark -Tfields -e data' Omits Last Character of Data
  • Index(es):
    • Date
    • Thread

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