[peerindex/peerindex.c] Out of range peer indexes do count as errors

This commit is contained in:
Lorenzo Cogotti 2021-07-27 16:43:27 +02:00
parent 4239f2168d
commit 42ff863599
1 changed files with 1 additions and 0 deletions

View File

@ -233,6 +233,7 @@ static void Peerindex_MarkPeerRefs(void)
Uint16 idx = beswap16(rib->peerIndex); Uint16 idx = beswap16(rib->peerIndex);
if (idx >= S.npeers) { if (idx >= S.npeers) {
Peerindex_Warning("CORRUPT MRT RECORD: Peer index '%u' is out of range", (unsigned) idx); Peerindex_Warning("CORRUPT MRT RECORD: Peer index '%u' is out of range", (unsigned) idx);
S.nerrors++;
continue; continue;
} }