From 9235dd498f6e4a14d09dc63f2b0b721636788498 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 6 May 2016 13:06:15 +0200 Subject: [PATCH] detect port: fix integer handling in hashing --- src/detect-engine-port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detect-engine-port.c b/src/detect-engine-port.c index 59fd2d08f4..d545dc16d3 100644 --- a/src/detect-engine-port.c +++ b/src/detect-engine-port.c @@ -1487,7 +1487,7 @@ static uint32_t DetectPortHashFunc(HashListTable *ht, void *data, uint16_t datal SCLogDebug("hashing sgh %p", p); - hash = (p->port << 16) | p->port2; + hash = ((uint32_t)p->port << 16) | p->port2; hash %= ht->array_size; SCLogDebug("hash %"PRIu32, hash); -- 2.47.2