If unkown Tag's are found in a set add length.

svn path=/trunk/; revision=15853
This commit is contained in:
Anders Broman 2005-09-17 21:02:51 +00:00
parent 5aa2e7bf23
commit 7ef861a9a9
1 changed files with 19 additions and 21 deletions

View File

@ -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");
}
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;
}
}
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;
}
}