When reassembling a packet, all data, including data with
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 25 Jul 2005 18:03:19 +0000 (18:03 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 25 Jul 2005 18:03:19 +0000 (18:03 +0000)
commitd5fc7e8bc3b8f9bd1af98033c6db4825518d0d85
tree6157302b8aaee88ddf3eaf003f0cd1b168649a44
parenta09c6663efe60e3c8031ea0523df7302efaca0b9
When reassembling a packet, all data, including data with
FD_NOT_MALLOCED set, has to be copied - all FD_NOT_MALLOCED means is
that the fragment's data is part of the old reassembled data, rather
than a malloced chunk of its own (this happens if, after reassembly, the
dissector says more reassembly is necessary, as can happen, for example,
in the case of HTTP and other protocols where reassembly continues until
a terminator is seen).  Not copying the data means that the reassembled
data is, in part, whatever random junk happens to be in the
newly-allocated buffer.

Back out the change not to copy the data, but add some sanity checks, in
the hopes of preventing the crash that caused the change not to copy the
data to be added, and in the hopes of discovering the ultimate source of
that crash and fixing it.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15057 f5534014-38df-0310-8fa8-9805f1628bb7
epan/reassemble.c