[Bro-Dev] #530: Change to hashing code

Bro Tracker bro at tracker.bro-ids.org
Tue Aug 2 13:33:46 PDT 2011


#530: Change to hashing code
---------------------+--------------------
 Reporter:  seth     |      Owner:
     Type:  Problem  |     Status:  new
 Priority:  Normal   |  Milestone:  Bro1.6
Component:  Bro      |    Version:
 Keywords:  beta     |
---------------------+--------------------
 This is probably fairly inconsequential, but it seemed like an oversight
 to me.  Should the following change be applied?

 {{{
 diff --git a/src/Hash.cc b/src/Hash.cc
 index ffabe36..1cee679 100644
 --- a/src/Hash.cc
 +++ b/src/Hash.cc
 @@ -170,7 +170,7 @@ hash_t HashKey::HashBytes(const void* bytes, int size)
                 {
                 const uint8* b = reinterpret_cast<const uint8*>(bytes);
                 // H3 doesn't check if size is zero
 -               return ( size == 0 ) ? 0 : (*h3)(bytes, size);
 +               return ( size == 0 ) ? 0 : (*h3)(b, size);
                 }

         // Fall back to HMAC/MD5 for longer data (which is usually rare).
 }}}

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/530>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list