Wireshark-dev: Re: [Wireshark-dev] Proper use of proto_tree_add_string?

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 29 Jun 2007 11:06:30 -0700
kannoll wrote:
That's a good idea, and I'll probably have a place to use it, but my
immediate problem is packets that end before expected,

...which means that you'd be trying to fetch data past the end of the packet, right? If so, an exception would be thrown (as you're going past the end of the tvbuff), and the packet will be marked as malformed for you - you don't even have to write any code to do that.