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>
This commit is contained in:
Guy Harris 2018-05-08 20:37:21 -07:00
parent c1deca1401
commit 2946575199
1 changed files with 1 additions and 0 deletions

View File

@ -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--;
}
}