Wireshark-dev: Re: [Wireshark-dev] strange crash

From: Kovarththanan Rajaratnam <kovarththanan.rajaratnam@xxxxxxxxx>
Date: Sat, 15 Aug 2009 16:45:31 +0200
Hey,

Robert Hogan wrote:
On Saturday 15 August 2009 12:34:00 Kovarththanan Rajaratnam wrote:
Which version of Wireshark are you using? This issue sounds suspiciously
like:

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2893


I'm using trunk.


Scratch that bug report. I've just read your original email again and this time I actually _read_ it ;) I totally missed the || part:

....
    { &hf_tn5250_aid,
        {  "Attention Identification", "hf_tn5250_aid",
      FT_UINT8, BASE_HEX||BASE_RANGE_STRING, <----------- ||
RVALS(vals_tn5250_attention_identification_bytes), 0x0,
            "hf_tn5250_aid", HFILL }},
....

I'm not sure what we can do to catch this. 'BASE_HEX||BASE_RANGE_STRING' will evalute to TRUE (1) which is the value assigned to BASE_DEC. IOW, a valid value.

Maybe we can turn on a warning in GCC?

Best regards,
Kovarththanan Rajaratam