aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mqtt.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-12-24 08:29:50 +0100
committerAnders Broman <a.broman58@gmail.com>2018-01-02 05:29:39 +0000
commit0bde3e96f0c51ed141e94ae82eed24f1a38f712c (patch)
tree0518754ff0e74439b6e345eea50a0dd32ff131a5 /epan/dissectors/packet-mqtt.c
parentaf6dee35715a4079acaa7d9a413b6f7d859c8c8b (diff)
Add ENC_VARINT_QUIC
Used to support variable length in QUIC protocol Bug: 13881 Change-Id: Ia274b1530152376c5fb4e364fc4cf5ab246be1b3 Reviewed-on: https://code.wireshark.org/review/24990 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Craig Jackson <cejackson51@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-mqtt.c')
-rw-r--r--epan/dissectors/packet-mqtt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mqtt.c b/epan/dissectors/packet-mqtt.c
index a441066808..742ac0584a 100644
--- a/epan/dissectors/packet-mqtt.c
+++ b/epan/dissectors/packet-mqtt.c
@@ -588,7 +588,7 @@ static guint get_mqtt_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
guint64 msg_len;
guint len_offset;
- len_offset = tvb_get_varint(tvb, (offset + MQTT_HDR_SIZE_BEFORE_LEN), FT_VARINT_MAX_LEN, &msg_len);
+ len_offset = tvb_get_varint(tvb, (offset + MQTT_HDR_SIZE_BEFORE_LEN), FT_VARINT_MAX_LEN, &msg_len, ENC_VARINT_PROTOBUF);
/* Explicitly downcast the value, because the length can never be more than 4 bytes */
return (guint)(msg_len + len_offset + MQTT_HDR_SIZE_BEFORE_LEN);
@@ -753,7 +753,7 @@ static guint dissect_mqtt_properties(tvbuff_t *tvb, proto_tree *mqtt_tree, guint
proto_item *ti;
guint64 vbi;
- const guint mqtt_prop_offset = tvb_get_varint(tvb, offset, FT_VARINT_MAX_LEN, &vbi);
+ const guint mqtt_prop_offset = tvb_get_varint(tvb, offset, FT_VARINT_MAX_LEN, &vbi, ENC_VARINT_PROTOBUF);
/* Property Length field can be stored in uint32 */
const guint mqtt_prop_len = (gint)vbi;
@@ -925,7 +925,7 @@ static int dissect_mqtt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
conversation_add_proto_data(conv, proto_mqtt, mqtt);
}
- mqtt_len_offset = tvb_get_varint(tvb, (offset + MQTT_HDR_SIZE_BEFORE_LEN), FT_VARINT_MAX_LEN, &msg_len);
+ mqtt_len_offset = tvb_get_varint(tvb, (offset + MQTT_HDR_SIZE_BEFORE_LEN), FT_VARINT_MAX_LEN, &msg_len, ENC_VARINT_PROTOBUF);
/* Explicit downcast, typically maximum length of message could be 4 bytes */
mqtt_msg_len = (gint) msg_len;