From a7603a1f684f0ae5a2084530d44e37f29ee9e41f Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 4 Dec 2017 13:44:09 -0800 Subject: Fix loop bounds check. Fix indentation while we're at it. Change-Id: If8acaa944fd4c1aae848faa3a99f7566e003e801 Reviewed-on: https://code.wireshark.org/review/24707 Reviewed-by: Guy Harris --- epan/dissectors/packet-ipx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epan/dissectors/packet-ipx.c b/epan/dissectors/packet-ipx.c index cee05e9fa1..28f67152f3 100644 --- a/epan/dissectors/packet-ipx.c +++ b/epan/dissectors/packet-ipx.c @@ -930,7 +930,7 @@ dissect_ipxrip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ } else { proto_tree_add_uint_format_value(rip_tree, hf_ipxrip_ticks, tvb, cursor+6, 2, ticks, - "%d ms", ticks * 1000 / 18); + "%d ms", ticks * 1000 / 18); } } } @@ -1252,7 +1252,7 @@ dissect_ipxsap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _ query.query_type == IPX_SAP_NEAREST_RESPONSE) { /* responses */ guint available_length = tvb_reported_length(tvb); - for (cursor = 2; cursor <= available_length; cursor += 64) { + for (cursor = 2; cursor < available_length; cursor += 64) { const guint8 *server_name; ti = proto_tree_add_item(sap_tree, hf_sap_server, tvb, cursor, 64, ENC_NA); -- cgit v1.2.3