Wireshark mailing list archives

Re: TCP dissect issue when app-level message spans multiple TCP packets


From: Chris Maynard <chris.maynard () gtech com>
Date: Thu, 5 May 2011 15:27:19 +0000 (UTC)

Graham Bloice <graham.bloice@...> 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)".


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: