summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2005-09-17 21:02:51 +0000
committerAnders Broman <anders.broman@ericsson.com>2005-09-17 21:02:51 +0000
commit7ef861a9a979cefe3b0cd252ff05250ab7763b24 (patch)
tree944c85805b36c695d500587530738004dc9d2fb8
parent5aa2e7bf23d727ccab1dcdc3dde5ae18469a941b (diff)
downloadwireshark-7ef861a9a979cefe3b0cd252ff05250ab7763b24.tar.gz
If unkown Tag's are found in a set add length.
svn path=/trunk/; revision=15853
-rw-r--r--epan/dissectors/packet-ber.c40
1 files changed, 19 insertions, 21 deletions
diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c
index 9816de81a0..f9c9911acc 100644
--- a/epan/dissectors/packet-ber.c
+++ b/epan/dissectors/packet-ber.c
@@ -1288,36 +1288,34 @@ printf("SET dissect_ber_set(%s) calling subdissector\n",name);
}
}
#endif
- count=cset->func(pinfo, tree, next_tvb, 0);
- if(count) {
- /* we found it! */
- if(set_idx < MAX_SET_ELEMENTS)
- mandatory_fields &= ~(1 << set_idx);
+ count=cset->func(pinfo, tree, next_tvb, 0);
- offset = eoffset;
+ if(count) {
+ /* we found it! */
+ if(set_idx < MAX_SET_ELEMENTS)
+ mandatory_fields &= ~(1 << set_idx);
- if(!(cset->flags & BER_FLAGS_NOOWNTAG) ) {
- /* if we stripped the tag and length we should also strip the EOC is ind_len */
- if(ind_field == 1)
- {
- /* skip over EOC */
- if(show_internal_ber_fields){
- proto_tree_add_text(tree, tvb, offset, count, "SET FIELD EOC");
- }
- }
- }
-
- break;
+ offset = eoffset;
- }
+ if(!(cset->flags & BER_FLAGS_NOOWNTAG) ) {
+ /* if we stripped the tag and length we should also strip the EOC is ind_len */
+ if(ind_field == 1){
+ /* skip over EOC */
+ if(show_internal_ber_fields){
+ proto_tree_add_text(tree, tvb, offset, count, "SET FIELD EOC");
+ }
+ }
+ }
+ break;
+ }
}
}
if(!cset->func) {
/* we didn't find a match */
- proto_tree_add_text(tree, tvb, offset, len, "BER Error: Unknown field in SET class:%d(%s) tag:%d",class,val_to_str(class,ber_class_codes,"Unknown"),tag);
-
+ proto_tree_add_text(tree, tvb, hoffset, len, "BER Error: Unknown field in SET class:%d(%s) tag:%d",class,val_to_str(class,ber_class_codes,"Unknown"),tag);
+ offset = eoffset;
}
}