Ethereal-dev: Re: [Ethereal-dev] need help with tvb exceptions

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

From: Andy Howell <AndyHowell@xxxxxxxxxxxxx>
Date: Sun, 14 Nov 2004 20:21:54 -0600
Peter Johansson wrote:

Somewhere in your code you are probably doing something similar to proto_tree_add_item(tree, hf_something, tvb, some_offset, some_length, FALSE); My guess is that some_offset + some_length exceeds the value returned by tvb_length(tvb). Set a breakpoint in packet-frame.c near or at line 244 (search for "Malformed packet") and run again, check the stack to verify where in your code it causes "an exception" and why.


Peter,

Thanks for you help. Turns out I was miscalculating the "reported length" for tvb_new_subset().

Andy