Ethereal-dev: Re: [Ethereal-dev] Initial DLSw dissector

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Paul Ionescu <paul@xxxxxxxx>
Date: Thu, 27 Dec 2001 13:26:59 +0200
Ronnie Sahlberg wrote:
> 
> Hi,
> 
> I also think there were a few value_string arrays that did not have a proper
> {0, NULL}
> terminator in them.
> I think you might want to check this in the dissector. I would assume
> val_to_str() would dump core
> if the terminator is missing and someone tries to look up something not in
> the table.
> 

Hi Ronnie,

As far as I remember, there is only one value_string array that has no
{0 ,NULL} termination
, the dlsw_pri_vals[] , and this is because it has all values possible
(from 0 to 7), so there will always be a match.
This array is only checked by 
match_strval((tvb_get_guint8(tvb,22)&7),dlsw_pri_vals)) which should be
always in the proper range.
If you have comments to this observation, please tell me.

Cheers,
Paul