Wireshark-bugs: [Wireshark-bugs] [Bug 4162] New: patch to editcap for -t and -w option's fractio
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4162
Summary: patch to editcap for -t and -w option's fractional
digits determination
Product: Wireshark
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Low
Component: Extras
AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
ReportedBy: jyoung@xxxxxxx
Jim Young <jyoung@xxxxxxx> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #3841| |review_for_checkin?
Flag| |
Created an attachment (id=3841)
--> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3841)
Patch to editcap.c to fix -t and -w options
Build Information:
C:\projects\wireshark\wireshark-gtk2>tshark -v
TShark 1.3.1 (SVN Rev 30630 from /trunk)
Copyright 1998-2009 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Compiled with GLib 2.20.5, with WinPcap (version unknown), with libz 1.2.3,
without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8, with c-ares
1.6.0,
with Lua 5.1, without Python, with GnuTLS 2.8.1, with Gcrypt 1.4.4, with MIT
Kerberos, with GeoIP.
Running on Windows XP Service Pack 2, build 2600, with WinPcap version 4.1
beta5
(packet.dll version 4.1.0.1452), based on libpcap version 1.0.0, GnuTLS 2.8.1,
Gcrypt 1.4.4.
Built using Microsoft Visual C++ 9.0 build 30729
C:\projects\wireshark\wireshark-gtk2>
--
This patch limits the number of fractional digits used to calculate the
fractional component of editcap's -t and -w options.
Specifically this patch truncates the fractional component (if any) of the -t
and -w options to 6 and 9 respectively.
Without this patch in place, fractional digit sequences having leading zeros
and a strlen containing more than the expected number of digits results in
incorrect fractional digit values.
This problem was found when using editcap -t with a value of "0.0124035".
A workaround for this bug is to manually limit the number of fractional digits
presented if any leading zeros are present: e.g. -t 0.012403 instead of -t
0.0124035.
This patch probably should be ported over to next public release.
--
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.