Skip to content

Commit b3a0c79

Browse files
kvapkelvich
authored andcommitted
Add MtmNodeId range check.
1 parent b3225a3 commit b3a0c79

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

multimaster.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,7 +1869,10 @@ static void MtmSplitConnStrs(void)
18691869
}
18701870
if (i > MAX_NODES) {
18711871
elog(ERROR, "Multimaster with more than %d nodes is not currently supported", MAX_NODES);
1872-
}
1872+
}
1873+
if (MtmNodeId > i) {
1874+
elog(ERROR, "Multimaster node id %d is out of range [%d..%d]", MtmNodeId, 1, i);
1875+
}
18731876
if (i < 2) {
18741877
elog(ERROR, "Multimaster should have at least two nodes");
18751878
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy