Skip to content

Commit

Permalink
Fix out of bounds access.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jackburton79 committed Jan 29, 2013
1 parent 00bc40a commit c0b42ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/add-ons/kernel/network/protocols/ipv6/multicast.h
Expand Up @@ -172,7 +172,7 @@ class MulticastGroupInterface {
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;
Expand Down

0 comments on commit c0b42ec

Please sign in to comment.