Shuffle a comment, and clean up white space.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 7 Jan 2002 00:57:46 +0000 (00:57 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 7 Jan 2002 00:57:46 +0000 (00:57 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4490 f5534014-38df-0310-8fa8-9805f1628bb7

packet-nbns.c

index b960a4671588e9c163605e55888c3af6ed9a2e0e..7f19b6c7bee9a3bd1737a7221f7eb36e507b5165 100644 (file)
@@ -3,7 +3,7 @@
  * to when it had only NBNS)
  * Guy Harris <guy@alum.mit.edu>
  *
- * $Id: packet-nbns.c,v 1.68 2002/01/07 00:16:32 guy Exp $
+ * $Id: packet-nbns.c,v 1.69 2002/01/07 00:57:46 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -1497,6 +1497,8 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo,
          if (reported_len > length)
            reported_len = length;
 
+         next_tvb = tvb_new_subset(tvb, offset, len, reported_len);
+
          /*
           * Catch the ReportedBoundsError exception; if this
           * particular message happens to get a ReportedBoundsError
@@ -1507,22 +1509,21 @@ dissect_nbss_packet(tvbuff_t *tvb, int offset, packet_info *pinfo,
           * If it gets a BoundsError, we can stop, as there's nothing
           * more to see, so we just re-throw it.
           */
-         next_tvb = tvb_new_subset(tvb, offset, len, reported_len);
-          saved_proto = pinfo->current_proto;
-          TRY {
+         saved_proto = pinfo->current_proto;
+         TRY {
            dissect_netbios_payload(next_tvb, pinfo, tree);
-          }
-          CATCH(BoundsError) {
-            RETHROW;
-          }
-          CATCH(ReportedBoundsError) {
+         }
+         CATCH(BoundsError) {
+           RETHROW;
+         }
+         CATCH(ReportedBoundsError) {
            if (check_col(pinfo->cinfo, COL_INFO))
              col_append_str(pinfo->cinfo, COL_INFO, "[Malformed Packet]");
            proto_tree_add_protocol_format(tree, proto_malformed, tvb, 0, 0,
                                "[Malformed Packet: %s]", pinfo->current_proto );
            pinfo->current_proto = saved_proto;
-          }
-          ENDTRY;
+         }
+         ENDTRY;
          break;
 
        }