From 20d2047d409b672635d08f4d2fde9fe787acf0b6 Mon Sep 17 00:00:00 2001 From: Corentin Prigent Date: Tue, 30 Jun 2026 17:24:21 +0200 Subject: [PATCH] prevent overflow of int with bit shifting when initializing hash table --- sources/mshmet/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/mshmet/hash.c b/sources/mshmet/hash.c index 2536b76..6357882 100644 --- a/sources/mshmet/hash.c +++ b/sources/mshmet/hash.c @@ -24,7 +24,7 @@ int hashel_3d(pMesh mesh) { hsize = mesh->ne; /* init */ - inival = 2 << 30; + inival = INT_MAX; for (k=0; k<=mesh->ne; k++) hcode[k] = -inival;