Wireshark-dev: Re: [Wireshark-dev] TCP dissect issue when app-level message spans multiple TCP
From: Chris Maynard <[email protected]>
Date: Thu, 5 May 2011 15:27:19 +0000 (UTC)
Graham Bloice <[email protected]> writes:

>     The
>         get_message_tcpmessage_len function should also check that there
>         are enough bytes in the passed in tvb to call tvb_get_letohl(),
>         as the OP's code did.-- 

I don't think that's the case as tcp_dissect_pdus() is told how many bytes are
needed via the fixed_len argument, so it won't call get_message_tcpmessage_len()
until at least that many bytes are available.

See packet-tcp.c's tcp_dissect_pdus() where it checks for "if (length_remaining
< fixed_len)".