Permalink
Browse files

SERVER-6647 Potential out of bounds access in ReplicaSetMonitor

Backport of commit f86f60a
  • Loading branch information...
1 parent 5eaf375 commit 239d7d6a195f7dff5ad32b6cb29cd64e635c1889 @monkey101 monkey101 committed Oct 15, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 client/dbclient_rs.cpp
View
@@ -625,7 +625,10 @@ namespace mongo {
{
scoped_lock lk( _lock );
probablePrimaryIdx = _find_inlock( maybePrimary );
- probablePrimaryConn = _nodes[probablePrimaryIdx].conn;
+
+ if (probablePrimaryIdx >= 0) {
+ probablePrimaryConn = _nodes[probablePrimaryIdx].conn;
+ }
}
if ( probablePrimaryIdx >= 0 ) {

0 comments on commit 239d7d6

Please sign in to comment.