diff options
author | Jeremy Rubin <jeremy.l.rubin@gmail.com> | 2017-02-19 13:18:04 -0500 |
---|---|---|
committer | Jeremy Rubin <jeremy.l.rubin@gmail.com> | 2017-07-08 13:31:47 -0700 |
commit | e0451e3e2af64cc975dd76389dc3ea4f8b9c2a62 (patch) | |
tree | cc4517d114d57436167929e05804f6548a87fb52 | |
parent | 1d4805ce04645f3203b0cfd3d66ea710e7433eb4 (diff) |
Fix subscript[0] bug in net.cpp if GetGroup returns a 0-sized vector
-rw-r--r-- | src/net.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 301cf58b87..5bf3af7ea3 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2876,5 +2876,5 @@ uint64_t CConnman::CalculateKeyedNetGroup(const CAddress& ad) const { std::vector<unsigned char> vchNetGroup(ad.GetGroup()); - return GetDeterministicRandomizer(RANDOMIZER_ID_NETGROUP).Write(&vchNetGroup[0], vchNetGroup.size()).Finalize(); + return GetDeterministicRandomizer(RANDOMIZER_ID_NETGROUP).Write(vchNetGroup.data(), vchNetGroup.size()).Finalize(); } |