If we're making two passes and we have a display filter applied, create
authorGerald Combs <gerald@wireshark.org>
Wed, 20 Jun 2012 20:44:05 +0000 (20:44 -0000)
committerGerald Combs <gerald@wireshark.org>
Wed, 20 Jun 2012 20:44:05 +0000 (20:44 -0000)
a protocol tree in process_packet_first_pass(). Otherwise we crash with

ERROR:dfvm.c:434:dfvm_apply: assertion failed: (tree)

svn path=/trunk/; revision=43420

tshark.c

index 46f9949761e85eeade5c66b918a0b064515ca37a..2b83d54881dbdda5942c648649dbfec9f95b6f77 100644 (file)
--- a/tshark.c
+++ b/tshark.c
@@ -2498,6 +2498,7 @@ process_packet_first_pass(capture_file *cf,
 {
   frame_data fdlocal;
   guint32 framenum;
+  gboolean create_proto_tree = FALSE;
   epan_dissect_t edt;
   gboolean passed;
 
@@ -2520,11 +2521,14 @@ process_packet_first_pass(capture_file *cf,
       /* Grab any resolved addresses */
       host_name_lookup_process(NULL);
 
+      if (cf->rfcode)
+        create_proto_tree = TRUE;
+
     /* The protocol tree will be "visible", i.e., printed, only if we're
        printing packet details, which is true if we're printing stuff
        ("print_packet_info" is true) and we're in verbose mode ("verbose"
        is true). */
-    epan_dissect_init(&edt, FALSE, FALSE);
+    epan_dissect_init(&edt, create_proto_tree, FALSE);
 
     /* If we're running a read filter, prime the epan_dissect_t with that
        filter. */