aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-stun.c
diff options
context:
space:
mode:
authorMartin Mathieson <martin.mathieson@keysight.com>2020-08-13 10:42:07 +0100
committerAnders Broman <a.broman58@gmail.com>2020-08-13 12:57:42 +0000
commit30beb5ae22aea1998260c795608361ee4a49b288 (patch)
tree9d41d238e202a1cc44e54bac4ab8f738fe6a049f /epan/dissectors/packet-stun.c
parentf59262b94c10cb3e2c5655274698899dc41d43cf (diff)
STUN: att_pw_alg and alg_param_len items are unsigned ints.
Change-Id: I3652fb9b2a98617a2657d01c753efdd30851a512 Reviewed-on: https://code.wireshark.org/review/38150 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-stun.c')
-rw-r--r--epan/dissectors/packet-stun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/dissectors/packet-stun.c b/epan/dissectors/packet-stun.c
index d90ba39327..05c8219a03 100644
--- a/epan/dissectors/packet-stun.c
+++ b/epan/dissectors/packet-stun.c
@@ -1205,8 +1205,8 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
case PASSWORD_ALGORITHM:
case PASSWORD_ALGORITHMS:
{
- gint alg, alg_param_len, alg_param_len_pad;
- gint remaining = att_length;
+ guint alg, alg_param_len, alg_param_len_pad;
+ guint remaining = att_length;
while (remaining > 0) {
guint loopoffset = offset + att_length - remaining;
if (remaining < 4) {
@@ -1214,14 +1214,14 @@ dissect_stun_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
loopoffset, remaining, "Too few bytes left for TLV header (%d < 4)", remaining);
break;
}
- proto_tree_add_item_ret_int(att_tree, hf_stun_att_pw_alg, tvb, loopoffset, 2, ENC_BIG_ENDIAN, &alg);
- proto_tree_add_item_ret_int(att_tree, hf_stun_att_pw_alg_param_len, tvb, loopoffset+2, 2, ENC_BIG_ENDIAN, &alg_param_len);
+ proto_tree_add_item_ret_uint(att_tree, hf_stun_att_pw_alg, tvb, loopoffset, 2, ENC_BIG_ENDIAN, &alg);
+ proto_tree_add_item_ret_uint(att_tree, hf_stun_att_pw_alg_param_len, tvb, loopoffset+2, 2, ENC_BIG_ENDIAN, &alg_param_len);
if (alg_param_len > 0) {
if (alg_param_len+4 >= remaining)
proto_tree_add_item(att_tree, hf_stun_att_pw_alg_param_data, tvb, loopoffset+4, alg_param_len, ENC_NA);
else {
proto_tree_add_expert_format(att_tree, pinfo, &ei_stun_short_packet, tvb,
- loopoffset, remaining, "Too few bytes left for parameter data (%d < %d)", remaining-4, alg_param_len);
+ loopoffset, remaining, "Too few bytes left for parameter data (%u < %u)", remaining-4, alg_param_len);
break;
}
}