Found by MSVC2013 Code Analysis
Change-Id: I58063946dd558e98308c87b36eeac0ddbe1a6e79
Reviewed-on: https://code.wireshark.org/review/7045
Reviewed-by: Bill Meier <wmeier@newsguy.com>
If it ends with a comma, then, if you don't provide any parameters, you
get a "no such -z statistic" message followed by a list of available
statistics.
If it doesn't end with a comma, then, if you don't provide any
parameters *and* a parameter is required, you get a usage message, which
is more useful - and, in many of those cases, a parameter *isn't*
required.
Change-Id: I81275ea41ad4611d8210ca3cb07c09f0abde58f2
Reviewed-on: https://code.wireshark.org/review/5308
Reviewed-by: Guy Harris <guy@alum.mit.edu>
The intent is to handle more than just command-line arguments; reflect that.
Change-Id: Ia10efda85a9d11c6579d1bec6f789cee30d9e825
Reviewed-on: https://code.wireshark.org/review/5304
Reviewed-by: Guy Harris <guy@alum.mit.edu>
The old routine had stat_ in the name, as the expectation was that they
were for statistics taps; that's still the expectation, so have stat_ in
the data structure and routine names.
Change-Id: Ic98d011012b8641173d41fa0ec4f4e625614370a
Reviewed-on: https://code.wireshark.org/review/5303
Reviewed-by: Guy Harris <guy@alum.mit.edu>
The intent here is to centralize more UI information so that we can move
more tap UI stuff to common code. This is a beginning.
Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30
Reviewed-on: https://code.wireshark.org/review/5301
Reviewed-by: Guy Harris <guy@alum.mit.edu>
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')
Fix manually some typo (in export_object_dicom.c and crc16-plain.c)
Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
In the process, fix various man page descriptions of the -t flag,
and add support for UTC absolute times in the iousers and iostat TShark
taps.
svn path=/trunk/; revision=53114
time_t. (That also lets us not care how big a time_t is, except that we
have a not-fixable Y2.038K problem with 32-bit time_t, about which we
merely warn in a comment.)
svn path=/trunk/; revision=50502
Don't nest g_strconcat() calls: g_strconcat(a, g_strconcat(b, c, NULL), NULL)
is equivalent to g_strconcat(a, b, c, NULL). (And g_strconcat(b, c) is
incorrect - you need a NULL at the end of the list.)
Checking whether a pointer is "> 0" is useful only in platform-dependent
situations or if you're doing a really greasy hack such as stuffing a
flag into the uppermost bit of the pointer; the test should just check
whether the pointer is null or not.
svn path=/trunk/; revision=50500
- tshark -q -z io,stat,1 causes core dump for files larger than ~2MB
(with this fix it will still overflow on 32-bits for frame time > 4294s)
- In tshark's "io,stat" eliminate the unrequested "Frames and bytes" col, fix formatting, and add "Duration"
From me:
Added casts to squelch compiler warnings on win7 64bit
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8839
svn path=/trunk/; revision=50488
We're allocating an array of pointers, not an array of objects, so make the
sizeof() reflect that to avoid over-allocating.
svn path=/trunk/; revision=50423
there's three coverity defects about division by zero in ui/cli/tap-iostat.c,
function iostat_packet()
This can be triggered from the command line
martin@greta# ./tshark -z io,stat,0.2,AVG\(frame.number\)
Capturing on eth0
Floating point exception
it->num is 0, wireshark crashes in
parent->max_vals[it->colnum] =
MAX(parent->max_vals[it->colnum], it->counter/it->num);
(and similar for other data types)
My proposal for a fix is to not update parent->max_vals[it->colnum] when
it->num==0, see the attached patch.
svn path=/trunk/; revision=42952
Bugs in the tshark '-z io,stat' output:
1: The LOAD stat in the last row of the output is inaccurate because rpc.time
is divided by the full interval rather than limiting it to the capture
duration.
2: An The empty comma field (for outputting total frames and bytes) is ignored
when it is the first field in the command.
3: Intervals at the end of capture that contain no data are not displayed. Such
intervals are as important to see as those (zero data intervals) that occur
earlier in the capture.
4: Floating point numbers are not properly aligned under their column headers.
Enhancements to '-z io,stat' output:
1. Column widths are determined by the maximum magnitude of their values rather
than set to a fixed width of 15 chars which allows for more stats to be
displayed per row without wrapping.
2. To improve readability, filters wrap at 102 chars or the table width,
whichever is greater, and wrap on the nearest space. An option can be added to
alter the 102-char limit.
3. Column numbers begin at 1 instead of 0.
4. The columns and entire output are enclosed in a border for improved
presentability in reports. The table can be imported into a spreadsheet by
specifying the vertical bar as the data delimiter.
"Fixed" compiling on Ubuntu
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6883
svn path=/trunk/; revision=41355
tap-iostat.c: In function ‘iostat_draw’:
tap-iostat.c:542:5: error: implicit declaration of function ‘itoa’
tap-iostat.c:756:9: error: too few arguments for format
tap-iostat.c:756:9: error: too few arguments for format
itoa() could be converted into a g_snprintf(), but the buffer used is only
one character long. Is that right?
For the printf() format one, I'm not sure what was intended.
svn path=/trunk/; revision=41234