EPL: Fix offset calculation
authorRoland Knall <roland.knall@br-automation.com>
Tue, 9 Sep 2014 12:27:02 +0000 (14:27 +0200)
committerAnders Broman <a.broman58@gmail.com>
Tue, 9 Sep 2014 20:00:03 +0000 (20:00 +0000)
 The offset was calculated too high, as it was added
 to itself and sizes were added multiple times

Change-Id: I1a581e96e2ab66e40f5566074e8bd1089f55bdb0
Reviewed-on: https://code.wireshark.org/review/4049
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
epan/dissectors/packet-epl.c

index fca51fb9d3c482d596950f5e9155eff127a50334..0fb89a9c72e96d07f046c0b973b306415e62c169 100644 (file)
@@ -3039,9 +3039,7 @@ dissect_epl_sdo_command_read_by_index(proto_tree *epl_tree, tvbuff_t *tvb, packe
                                        val_to_str(segmented, epl_sdo_asnd_cmd_segmentation, "User Defined (%d)"));
 
                size = tvb_reported_length_remaining(tvb, offset);
-               offset += dissect_epl_payload ( epl_tree, tvb, pinfo, offset, size, EPL_ASND );
-
-               offset += size;
+               offset = dissect_epl_payload ( epl_tree, tvb, pinfo, offset, size, EPL_ASND );
        }
 
        return offset;