aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2006-09-04 14:12:26 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2006-09-04 14:12:26 +0000
commit6f7f25b8d5da162a9dd5a04d696dc2829b0690b0 (patch)
tree2a6401044fb8cfb4a51b4db1da868e26a1fc25ae
parent56934c59cb84d17b19af45b3128d936bed2cc826 (diff)
downloadwireshark-6f7f25b8d5da162a9dd5a04d696dc2829b0690b0.tar.gz
wireshark-6f7f25b8d5da162a9dd5a04d696dc2829b0690b0.tar.bz2
wireshark-6f7f25b8d5da162a9dd5a04d696dc2829b0690b0.zip
From Donald White:
First, the length of the header of a sub-frame may be miscalculated if if the PID field is not present, but was present in a previous sub-frame. The calculation of the header length will use the value from the previous sub-frame. Second, correct the typo "ength" to "length". Third, the length of the current sub-frame was not passed as the reported length to a sub-dissector. When the sub-dissector calls tvb_reported_length(), the function returns the length of the complete frame and not the length of the sub-frame to be dissected. svn path=/trunk/; revision=19132
-rw-r--r--epan/dissectors/packet-ppp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 6c8f5d804a..45787f0a88 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -3012,6 +3012,7 @@ dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
pid_field = 2;
}
} else {
+ pid_field = 0; /*PID field is 0 bytes*/
if (!pid){ /*No Last PID, hence use the default */
if (pppmux_def_prot_id)
pid = pppmux_def_prot_id;
@@ -3034,7 +3035,7 @@ dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree_add_text(flag_tree,tvb,offset,length_field,"%s",
decode_boolean_bitfield(flags,0x80,8,"PID Present","PID not present"));
proto_tree_add_text(flag_tree,tvb,offset,length_field,"%s",
- decode_boolean_bitfield(flags,0x40,8,"2 bytes ength field ","1 byte length field"));
+ decode_boolean_bitfield(flags,0x40,8,"2 bytes length field ","1 byte length field"));
ti = proto_tree_add_text(hdr_tree,tvb,offset,length_field,"Sub-frame Length = %u",length);
@@ -3050,7 +3051,7 @@ dissect_pppmux(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
sub_ti = proto_tree_add_text(sub_tree,tvb,offset,length,"Information Field");
info_tree = proto_item_add_subtree(sub_ti,ett_pppmux_subframe_info);
- next_tvb = tvb_new_subset(tvb,offset,length,-1);
+ next_tvb = tvb_new_subset(tvb,offset,length,length);
if (!dissector_try_port(ppp_subdissector_table, pid, next_tvb, pinfo, info_tree)) {
call_dissector(data_handle, next_tvb, pinfo, info_tree);