Wireshark-dev: Re: [Wireshark-dev] Run Time Error
From: Jakub Zawadzki <[email protected]>
Date: Tue, 23 Feb 2010 15:53:49 +0100
On Tue, Feb 23, 2010 at 07:52:29PM +0530, Rajesh P S wrote:
> when I delete "dash.dll" (my_ protocol.dll)  from '
> C:\wireshark\wireshark-gtk2\plugins\1.1.4-SVN-DASH' its working fine for
> other protocols.But when I put my dissector dll into the above folder, it
> gives me above mentioned run time error. I  have attached the source file
> with this mail. Please help me out in this.

#v+
$ perl tools/checkAPIs.pl /tmp/packet-dash.c 
Warning: /tmp/packet-dash.c does not have an SVN Id tag.
Error: Found C++ style comments in /tmp/packet-dash.c
Error: /tmp/packet-dash.c                 : Not terminated: value_string primary_assets_flag_coding[] 
Error: /tmp/packet-dash.c                 : Not terminated: value_string asset_type_coding[] 
Error: Found prohibited APIs in /tmp/packet-dash.c: malloc,free
#v-

You need to put { 0, NULL } at the end of primary_assets_flag_coding & asset_type_coding, 
i.e:

static const value_string primary_assets_flag_coding[] = {                                                                  
    { 0, "Returns assets within the collapsed/collection/group asset" },                            
    { 1, "Returns the primary assets " },
    { 0, NULL }
};                                    

hth.