Wireshark-bugs: [Wireshark-bugs] [Bug 8333] Corrections to Recent DNP3 Control Code Changes in B
Date: Fri, 15 Feb 2013 00:47:01 +0000

changed bug 8333

What Removed Added
Hardware x86 All
OS Windows 7 All

Comment # 3 on bug 8333 from
The patch required a change:

Index: epan/dissectors/packet-dnp.c
===================================================================
--- epan/dissectors/packet-dnp.c    (revision 47660)
+++ epan/dissectors/packet-dnp.c    (revision 47661)
@@ -1905,12 +1905,11 @@
             /* Print "Count", "On Time" and "Off Time" to tree */
             proto_tree_add_text(point_tree, tvb, data_pos - 9, 9,
                "[Count: %u] [On-Time: %u] [Off-Time: %u]",
-                   al_ctlobj_count, al_ctlobj_on, al_ctlobj_off,
ctl_status_str);
+                   al_ctlobj_count, al_ctlobj_on, al_ctlobj_off);

             /* Get "Control Status" Field */
             al_ctlobj_stat = tvb_get_guint8(tvb, data_pos);
             proto_tree_add_item(point_tree, hf_dnp3_al_ctrlstatus, tvb,
data_pos, 1, ENC_LITTLE_ENDIAN);
-            ctl_status_str = val_to_str_ext(al_ctlobj_stat,
&dnp3_al_ctl_status_vals_ext, "Invalid Status (0x%02x)");
             data_pos += 1;


to fix compiler warnings.  If the intent was to show the status string in the
item being added with proto_tree_add_text(), you'd need to set ctl_status_str
*before* adding that item, and add an element to the format string to handle
it.


You are receiving this mail because:
  • You are watching all bug changes.