diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2018-03-03 15:25:56 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-03-04 07:44:11 +0000 |
commit | b475758123fde5fae476cd275958ac16d8eac7bd (patch) | |
tree | a0669cc307f1ba6a27badb081b782c925ae121b4 /epan/dissectors/packet-wap.c | |
parent | b580bdb9ddd5459bcdac95948ec41eae55be734f (diff) |
tvb_get_guintvar: don't overflow our return value
tvb_get_guintvar() returns a guint. If we haven't seen the final byte
after sizeof(guint) bytes, something is wrong. Abort and return 0.
This is the minimum fix for
Bug: 14473
Change-Id: Ibe8a1239c1cbbeec0591c66710416bb56f9f60dc
Reviewed-on: https://code.wireshark.org/review/26242
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-wap.c')
-rw-r--r-- | epan/dissectors/packet-wap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-wap.c b/epan/dissectors/packet-wap.c index 3c0ea83804..64f273f068 100644 --- a/epan/dissectors/packet-wap.c +++ b/epan/dissectors/packet-wap.c @@ -58,7 +58,7 @@ tvb_get_guintvar (tvbuff_t *tvb, guint offset, guint *octetCount, packet_info *p #endif } - if (counter > 5) { + if (counter > sizeof(value)) { proto_tree_add_expert(NULL, pinfo, ei, tvb, offset, counter); value = 0; } |