diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2014-06-19 14:32:55 -0700 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2014-06-27 03:25:39 +0000 |
commit | a189ed8194beba4c1ae4b802052e0fde9524921e (patch) | |
tree | 35d55ebaa7ee1824100e42dc47145a8f88267bde | |
parent | 35ee9d2b43e8b63fa19a6d8524ef6e71706bae09 (diff) | |
download | wireshark-a189ed8194beba4c1ae4b802052e0fde9524921e.tar.gz |
handle TS packet reassembly for PES packets with 0 length field
(unknown length)
this fixes bug 9527
Change-Id: I255ae9662dfeea06e61e4b0891e0ea8eaa254d0f
Reviewed-on: https://code.wireshark.org/review/2462
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
(cherry picked from commit 1e9bc6e4832d99be59e9140558b0265828fd590e)
Reviewed-on: https://code.wireshark.org/review/2679
-rw-r--r-- | epan/dissectors/packet-mp2t.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index 8ddf8b6804..27797b268f 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -689,11 +689,24 @@ mp2t_process_fragmented_payload(tvbuff_t *tvb, gint offset, guint remaining_len, /* "pointer" contains the number of bytes until the * start of the new section + * * if the new section does not start immediately after the * pointer field (i.e. pointer>0), the remaining bytes before the * start of the section are another fragment of the - * current packet */ - if (pointer>0 && fragmentation) { + * current packet + * + * if pointer is 0, a new upper-layer packet starts at the + * beginning of this TS packet + * if we have pending fragments, the last TS packet contained the + * last fragment and at the time we processed it, we couldn't figure + * out that it is the last fragment + * this is the case e.g. for PES packets with a 0 length field + * ("unbounded length") + * to handle this case, we add an empty fragment (pointer==0) + * and reassemble, then we process the current TS packet as + * usual + */ + if (fragmentation) { mp2t_fragment_handle(tvb, offset, pinfo, tree, frag_id, frag_cur_pos, pointer, TRUE, pid_analysis->pload_type); frag_id++; |