diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-08 17:48:22 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-10-08 17:48:22 +0000 |
commit | 33f116a46d8b3c304f682e04b3c1abda21c30588 (patch) | |
tree | 725ad8a515564516d2b3f3ee8ea1953ee100a7f0 /epan/dissectors/packet-ieee8023.c | |
parent | 7321549932137acdedf5216226e74094ac749ef5 (diff) | |
download | wireshark-33f116a46d8b3c304f682e04b3c1abda21c30588.tar.gz |
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().
svn path=/trunk/; revision=34436
Diffstat (limited to 'epan/dissectors/packet-ieee8023.c')
-rw-r--r-- | epan/dissectors/packet-ieee8023.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee8023.c b/epan/dissectors/packet-ieee8023.c index fd98547218..0cdcc46714 100644 --- a/epan/dissectors/packet-ieee8023.c +++ b/epan/dissectors/packet-ieee8023.c @@ -48,6 +48,7 @@ dissect_802_3(volatile int length, gboolean is_802_2, tvbuff_t *tvb, tvbuff_t *volatile trailer_tvb = NULL; const char *saved_proto; gint captured_length, reported_length; + void *pd_save; length_it = proto_tree_add_uint(fh_tree, length_id, tvb, offset_after_length - 2, 2, length); @@ -96,6 +97,7 @@ dissect_802_3(volatile int length, gboolean is_802_2, tvbuff_t *tvb, before an exception was thrown, we can still put in an item for the trailer. */ saved_proto = pinfo->current_proto; + pd_save = pinfo->private_data; TRY { if (is_802_2) call_dissector(llc_handle, next_tvb, pinfo, tree); @@ -122,6 +124,13 @@ dissect_802_3(volatile int length, gboolean is_802_2, tvbuff_t *tvb, Show the exception, and then drive on to show the trailer, restoring the protocol value that was in effect before we called the subdissector. */ + + /* 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; } |