Commit Graph

4 Commits

Author SHA1 Message Date
Guy Harris b7e9582fd7 Fix the calculation of the number of levels in the radix tree.
The algorithm being used calculated the number of levels in a
1024-leaf-node tree as being 2, but it's 1 - 0 elements means 0 levels,
1 through 1024 elements means 1 level, 1025 through 1024^2 elements
means 2 levels, etc..  With a count of 1024, the loop would bump the
level count from 0 to 1, and divide the element count by 1024, yielding
1, so the loop would not terminate, and the level count would them go
from 1 to 2 and the element count would go to 0.

This could cause problems if exactly 1024 packets were seen.

Just use an if chain, similar to the one used when adding elements to
the tree.

Bug: 13433
Change-Id: I3eaeaf374bb65b37b38a59e95f77cac6690614ed
Reviewed-on: https://code.wireshark.org/review/20379
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-03-04 04:35:42 +00:00
Bill Meier f3dd7fe1eb Fix whitespace/indentation to match editor modelines.
Change-Id: I3445ae22f10584582d465bf632942e016f5f70ca
Reviewed-on: https://code.wireshark.org/review/3452
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 20:42:21 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(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>
2014-03-04 14:27:33 +00:00
Jeff Morriss 45449ce1a8 Move some more modules into epan.
svn path=/trunk/; revision=50517
2013-07-11 23:57:11 +00:00