The problem was originally reported in https://github.com/bitcoin/bitcoin/issues/22450#issuecomment-880629375. This is a dedicated issue to track it independently because it is a different problem than the one reported in #22450 OP/description.

```
fuzz: addrman.cpp:149: void CAddrMan::SwapRandom(unsigned int, unsigned int): Assertion `nRndPos1 < vRandom.size() && nRndPos2 < vRandom.size()' failed.
```

To reproduce:
```sh
FUZZ=addrman_deserialize ./src/test/fuzz/fuzz /tmp/crash-ef7d4a4f940b8fdb4999f6a92969260cf8e1405f.log
```
[crash-ef7d4a4f940b8fdb4999f6a92969260cf8e1405f.log](https://github.com/bitcoin/bitcoin/files/6830072/crash-ef7d4a4f940b8fdb4999f6a92969260cf8e1405f.log)

}
        }
        
        
        uint256 asmap_checksum;
        if (m_asmap.size() != 0) {
            asmap_checksum = SerializeHash(m_asmap);
        }
        s << asmap_checksum;
    }
    template <typename Stream>
    void Unserialize(Stream& s_)
        EXCLUSIVE_LOCKS_REQUIRED(!cs)
    {
        LOCK(cs);
        assert(vRandom.empty());
        Format format;
        s_ >> Using<CustomUintFormatter<1>>(format);
        int stream_version = s_.GetVersion();
        if (format >= Format::V3_BIP155) {
            
            
            stream_version |= ADDRV2_FORMAT;
        }
        OverrideStream<Stream> s(&s_, s_.GetType(), stream_version);
        uint8_t compat;
        s >> compat;
        const uint8_t lowest_compatible = compat - INCOMPATIBILITY_BASE;
        if (lowest_compatible > FILE_FORMAT) {
            throw std::ios_base::failure(strprintf(