Wireshark-dev: Re: [Wireshark-dev] wireshark crash after "Adding Names to the protocol"
From: Josef Frühwirth <fruehwirth@xxxxxxxxx>
Date: Tue, 27 Oct 2009 09:27:24 +0100
2009/10/27 Guy Harris <guy@xxxxxxxxxxxx>:
>
> On Oct 27, 2009, at 1:01 AM, Josef Frühwirth wrote:
[..]
>
>
>> Shouldn't there be a better way to check the size/end of this data
>> structure!?
>
> "Better" in what sense?  Harder to omit?

To  prevent a dissector  author to run into that pitfall.
When writing a C string literal I don't have to care about '\0' end markers.
>From the dissector authors view, why should I care about end markers
when writing an array of value_strings?
I understand that at the end of a linked list there has to be a
distinct last element.
But from the dissector author's view you are defining an array (of
structs) and an array does not need an end marker.
I'm not sure if there is a way to provide a method to the dissector
author that he only needs to write a syntactic correct array without
keeping in mind that he actually is initializing a linked list.

I don't want to blame anybody I just want to help to improve usability
of dissector interface.

thx
Josef