aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wsmp.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2017-06-07 23:26:33 +0200
committerMichael Mann <mmann78@netscape.net>2017-06-08 02:23:57 +0000
commitbd130766438546ab64f7540597a2e3b82cbf8a3c (patch)
tree597dd7c621b1d8dd75dbf9547e29b2bfa324988a /epan/dissectors/packet-wsmp.c
parent07212bf95c2aa4f33627993c0dcd3b224d722b4b (diff)
wsmp: read the message length as big endian
We add the message length to the tree as big endian but we interpret it as little endian for our further calculations. This causes parsing errors. Use big endian for both cases. Bug: 13766 Change-Id: I4e6cdb7d4267be96ea78eb664e88c532a9a90b52 Reviewed-on: https://code.wireshark.org/review/22024 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-wsmp.c')
-rw-r--r--epan/dissectors/packet-wsmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-wsmp.c b/epan/dissectors/packet-wsmp.c
index 189d209819..6480fb8ca8 100644
--- a/epan/dissectors/packet-wsmp.c
+++ b/epan/dissectors/packet-wsmp.c
@@ -161,7 +161,7 @@ dissect_wsmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_
hf_wsmp_WAVEid, tvb, offset, 1, ENC_BIG_ENDIAN);
offset++;
- wsmlength = tvb_get_letohs( tvb, offset);
+ wsmlength = tvb_get_ntohs( tvb, offset);
proto_tree_add_item(wsmp_tree,
hf_wsmp_wsmlength, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;