diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-10-02 17:36:23 -0400 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-10-02 17:36:23 -0400 |
commit | d9bbb97bd0b8214d9f072b79858f030da3b43eff (patch) | |
tree | 1c83a8c3b2de8de3ba0d4cc88c4fd69b817ac609 /pref.h | |
parent | 6b9aea1b96dce089aeff5570527f65a83ea2a190 (diff) | |
download | subsurface-d9bbb97bd0b8214d9f072b79858f030da3b43eff.tar.gz |
Avoid working with invalid dive indices
When calling merge_two_dives both dives should be in the dive list so i
and j should never be -1. But just as extra precaution, bail if that's the
case (so that the helper functions below aren't called with negative
indices).
Coverity CID 1189514
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'pref.h')
0 files changed, 0 insertions, 0 deletions