Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 44576: /trunk/epan/dissectors/ /trun

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Fri, 24 Aug 2012 17:17:26 -0400
On 8/18/2012 10:27 PM, martinm@xxxxxxxxxxxxx wrote:

  Found error by adding temp debug to _match_strval_ext_init() - do we
  ever expect the entries not to be in order?

If the effort is taken to use an extended value string, then the value string array entries ought to be in order such that a direct access or a binary search can be used.

> Am wondering if the warning
  should be committed.


Seems reasonable to me....

Of course, the message can only occur if a specific extended value string is actually used, but that's OK.

--------

I wrote a (very) ugly hack to check value_string arrays associated with extended value strings by using libelf to dig around in .o files.

I did find a few more cases of linear searches (as well as some dup entries in arrays).

Bill