aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mp2t.c
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-08 17:48:22 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-10-08 17:48:22 +0000
commitcc5889fe7b82b5ae4dcd01f5642e4ea8e659ebdc (patch)
tree725ad8a515564516d2b3f3ee8ea1953ee100a7f0 /epan/dissectors/packet-mp2t.c
parenta6a262f1db09b666cf6d64f497d0d9f6acd36aea (diff)
Restore pinfo->private_data after an exception was thrown by a subdissector.
This is necessary in case a subdissector had changed it but was unable to restore it (due to the exception). Remove check_col(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34436 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-mp2t.c')
-rw-r--r--epan/dissectors/packet-mp2t.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c
index 3410e63f89..131a603be3 100644
--- a/epan/dissectors/packet-mp2t.c
+++ b/epan/dissectors/packet-mp2t.c
@@ -271,9 +271,9 @@ get_docsis_packet_length(tvbuff_t * tvb, gint offset)
static void
mp2t_depi_docsis_fragmentation_handle(tvbuff_t *tvb, guint offset,
- packet_info *pinfo, proto_tree *tree,
- guint frag_offset, guint frag_len,
- gboolean fragment_last)
+ packet_info *pinfo, proto_tree *tree,
+ guint frag_offset, guint frag_len,
+ gboolean fragment_last)
{
fragment_data *frag_msg = NULL;
tvbuff_t *new_tvb = NULL;
@@ -1006,6 +1006,7 @@ dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo,
if (tvb_get_ntoh24(tvb, offset) == 0x000001) {
tvbuff_t *next_tvb = tvb_new_subset(tvb, offset, payload_len, payload_len);
const char *saved_proto = pinfo->current_proto;
+ void *pd_save = pinfo->private_data;
TRY {
call_dissector(pes_handle, next_tvb, pinfo, mp2t_tree);
@@ -1019,6 +1020,11 @@ dissect_tsp(tvbuff_t *tvb, volatile gint offset, packet_info *pinfo,
media stream up into chunks of MP2T_PACKET_SIZE.
*/
CATCH2(BoundsError, ReportedBoundsError) {
+ /* Restore the private_data structure in case one of the
+ * called dissectors modified it (and, due to the exception,
+ * was unable to restore it).
+ */
+ pinfo->private_data = pd_save;
show_exception(next_tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);
pinfo->current_proto = saved_proto;
}