diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-07 21:10:51 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-07 21:10:51 +0000 |
commit | 96164ee15fe13b2f27050860c696b680a0984913 (patch) | |
tree | 57b8bd52ecbb18923caa9fea491d08586dfeb700 /epan/dissectors | |
parent | 626b802ba30727befb6dd0056fabadfc5043986e (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).
svn path=/trunk/; revision=34408
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-rpc.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c index 9da6edb4f6..665b2ec687 100644 --- a/epan/dissectors/packet-rpc.c +++ b/epan/dissectors/packet-rpc.c @@ -2841,6 +2841,7 @@ call_message_dissector(tvbuff_t *tvb, tvbuff_t *rec_tvb, packet_info *pinfo, { const char *saved_proto; volatile gboolean rpc_succeeded; + void *pd_save; /* * Catch the ReportedBoundsError exception; if @@ -2855,6 +2856,7 @@ call_message_dissector(tvbuff_t *tvb, tvbuff_t *rec_tvb, packet_info *pinfo, */ saved_proto = pinfo->current_proto; rpc_succeeded = FALSE; + pd_save = pinfo->private_data; TRY { rpc_succeeded = (*dissector)(rec_tvb, pinfo, tree, frag_tvb, ipfd_head, TRUE, rpc_rm, first_pdu); @@ -2866,6 +2868,12 @@ call_message_dissector(tvbuff_t *tvb, tvbuff_t *rec_tvb, packet_info *pinfo, show_reported_bounds_error(tvb, pinfo, tree); pinfo->current_proto = saved_proto; + /* 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; + /* * We treat this as a "successful" dissection of * an RPC packet, as "dissect_rpc_message()" |