Fix out of bounds access.
key.first is a pointer, so we shouldn't use the & operator here. CID 610870 and 610871. Should also fix ticket #9184. At least I cannot reproduce it anymore.
This commit is contained in:
@@ -501,7 +501,7 @@ size_t
|
||||
MulticastStateHash::HashKey(const KeyType &key) const
|
||||
{
|
||||
size_t result = 0;
|
||||
result = jenkins_hashword((const uint32*)&key.first,
|
||||
result = jenkins_hashword((const uint32*)key.first,
|
||||
sizeof(in6_addr) / sizeof(uint32), result);
|
||||
result = jenkins_hashword(&key.second, 1, result);
|
||||
return result;
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
size_t HashKey(const KeyType &key) const
|
||||
{
|
||||
size_t result = 0;
|
||||
result = jenkins_hashword((const uint32*)&key.first,
|
||||
result = jenkins_hashword((const uint32*)key.first,
|
||||
sizeof(in6_addr) / sizeof(uint32), result);
|
||||
result = jenkins_hashword(&key.second, 1, result);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user