Ethereal-dev: Re: [Ethereal-dev] Armagetronad dissector update

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

From: Gerald Combs <gerald@xxxxxxxxxxxx>
Date: Mon, 27 Mar 2006 21:49:35 -0600
Guillaume Chazarain wrote:
> Jaap Keuter wrote:
>> +               guint16 *ptr, *end = (guint16*) &data[data_len];
>> +               for (ptr = (guint16*) data; ptr != end; ptr++) {
>>
>> This will never end when data_len is odd.
> guint16 data_len = tvb_get_ntohs(tvb, offset + 4) * 2;
> This can't happen ;-)

What happens if "tvb_get_ntohs(tvb, offset + 4)" returns 0, 32768, or 32769?