aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wsp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-04-11 15:31:15 -0400
committerMichael Mann <mmann78@netscape.net>2017-04-11 23:26:09 +0000
commita71811af0de3ca9e7b5569f6e0f43dc7d4052d02 (patch)
tree6a524e8fe873cdcda3276b3e7cecaac489a5fe40 /epan/dissectors/packet-wsp.c
parenta445efdd03afd90ec0e849be4f7e46f28d2dedb7 (diff)
packet-wsp.c: Fix WSP dissector loop (add_capabilities)
Bug: 13581 Change-Id: I8b9f2df47fabb25d8851debc616fee1091d49f31 Reviewed-on: https://code.wireshark.org/review/21018 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-wsp.c')
-rw-r--r--epan/dissectors/packet-wsp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c
index 6284eaf975..e2db2f5b13 100644
--- a/epan/dissectors/packet-wsp.c
+++ b/epan/dissectors/packet-wsp.c
@@ -5198,6 +5198,8 @@ add_capabilities (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint8 pd
capaLen = capaValueLen + len;
cap_subtree = proto_tree_add_subtree(wsp_capabilities, tvb, offset, capaLen, ett_capabilities_entry, &cap_item, "Capability");
+ if (capaValueLen > tvb_len)
+ return;
offset += len;
/*
* Now offset points to the 1st byte of the capability type.
@@ -5251,7 +5253,7 @@ add_capabilities (proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb, guint8 pd
/* Now offset points to the 1st value byte of the capability. */
}
- proto_item_append_text(cap_item, ": %s", val_to_str_const(peek, wsp_capability_vals, "Invalid capabiliity"));
+ proto_item_append_text(cap_item, ": %s", val_to_str_const(peek, wsp_capability_vals, "Invalid capability"));
/* Now the capability type is known */
switch (peek) {
case WSP_CAPA_CLIENT_SDU_SIZE: