If unkown Tag's are found in a set add length.
authorAnders Broman <anders.broman@ericsson.com>
Sat, 17 Sep 2005 21:02:51 +0000 (21:02 -0000)
committerAnders Broman <anders.broman@ericsson.com>
Sat, 17 Sep 2005 21:02:51 +0000 (21:02 -0000)
svn path=/trunk/; revision=15853

epan/dissectors/packet-ber.c

index 9816de81a01471c2872432aef0fcaf2327c62986..f9c9911accd13d96be12a5c27c8fa748684d0c81 100644 (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");
-                         }
-                       }
-                   }
-
-                   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;                     
                } 
        }