diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-05-08 20:37:21 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-05-09 03:38:20 +0000 |
commit | 29465751994416552d859bc1be051b5dae48ae0a (patch) | |
tree | dee6c532ce5f94e32c1d0349a41f2bacd77c17ca | |
parent | c1deca140141a05d6d6a82b854eafa0f11c21e63 (diff) |
Fix infinite loop.
If a variable is a count of items, and we're looping while the count is
non-zero, we need to decrement it after every item we process.
Fixes Coverity CID 1435501.
Change-Id: Iabb0cb6276d4bcf4b1bdea9ec3ba943dac1b9938
Reviewed-on: https://code.wireshark.org/review/27402
Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index c06a7032c1..218592809a 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -12212,6 +12212,7 @@ dissect_hs20_osen(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void* ENC_NA); offset += 16; pmkid_index++; + pmkid_count--; } } |