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)

addrman1.Good(ipv4_tried);
    stream << addrman1;
    stream >> addrman2;
    const size_t max_addresses{0};
    const size_t max_pct{0};
    auto addresses = addrman2.GetAddr(max_addresses, max_pct, NET_I2P);
    BOOST_REQUIRE_EQUAL(addresses.size(), 7UL);
    std::sort(addresses.begin(), addresses.end()); 
    BOOST_CHECK_EQUAL(addresses[0].ToStringIP(), i2p_new4.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[0].GetPort(), I2P_SAM31_PORT);
    BOOST_CHECK_EQUAL(addresses[1].ToStringIP(), i2p_new2.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[1].GetPort(), I2P_SAM31_PORT);
    BOOST_CHECK_EQUAL(addresses[2].ToStringIP(), i2p_tried4.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[2].GetPort(), I2P_SAM31_PORT);
    BOOST_CHECK_EQUAL(addresses[3].ToStringIP(), i2p_tried3.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[3].GetPort(), I2P_SAM31_PORT);
    BOOST_CHECK_EQUAL(addresses[4].ToStringIP(), i2p_tried1.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[4].GetPort(), I2P_SAM31_PORT);
    BOOST_CHECK_EQUAL(addresses[5].ToStringIP(), i2p_tried2.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[5].GetPort(), I2P_SAM31_PORT);
    BOOST_CHECK_EQUAL(addresses[6].ToStringIP(), i2p_new1.ToStringIP());
    BOOST_CHECK_EQUAL(addresses[6].GetPort(), I2P_SAM31_PORT);
    addresses = addrman2.GetAddr(max_addresses, max_pct, NET_IPV4);
    BOOST_REQUIRE_EQUAL(addresses.size(), 2UL);
    std::sort(addresses.begin(), addresses.end()); 
    BOOST_CHECK_EQUAL(addresses[0].ToStringIPPort(), ipv4_new.ToStringIPPort());
    BOOST_CHECK_EQUAL(addresses[1].ToStringIPPort(), ipv4_tried.ToStringIPPort());
}
BOOST_AUTO_TEST_SUITE_END()