mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity 872858: hash gen overflow false positive
Help it ignore that we use the MS 7 bits in the next part of the operation and discard it in the first part.
This commit is contained in:
parent
fce734f279
commit
5a34404b1a
1 changed files with 4 additions and 1 deletions
|
@ -88,7 +88,10 @@ lws_map_hash_from_key_default(const lws_map_key_t key, size_t kl)
|
|||
const uint8_t *u = (const uint8_t *)key;
|
||||
|
||||
while (kl--)
|
||||
h = ((((h << 7) | (h >> 25)) + 0xa1b2c3d4) ^ (*u++)) ^ h;
|
||||
h = ((
|
||||
(((h & 0x1fffffff /* coverity */ ) << 7) |
|
||||
(h >> 25)) +
|
||||
0xa1b2c3d4) ^ (*u++)) ^ h;
|
||||
|
||||
return h;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue