]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon/MonMap.h: fix potential segfault, add assert()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 11 Jun 2015 18:01:26 +0000 (20:01 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:44 +0000 (10:50 +0200)
commita0dc63d795dcb94a46eb08c24fcd34716614fefc
tree8bb045d61e2b2f253e59ac6af369891d51c58c05
parent0292f96ec93544175d0048ee39727c4de5fd92e5
mon/MonMap.h: fix potential segfault, add assert()

Fix for:

CID 1297860 (#1 of 1): Argument cannot be negative (NEGATIVE_RETURNS)
1. Condition this->mon_addr.count(n), taking true branch
2. negative_return_fn: Function this->get_rank(n) returns a
   negative number. [show details]
3. var_assign: Assigning: signed variable m = get_rank.
4. negative_returns: m is passed to a parameter that cannot be
   negative.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mon/MonMap.h