From 993f30ffae5997a5dc85eb8ad6caf51ba0bbc2cb Mon Sep 17 00:00:00 2001 From: Drew Lewis Date: Thu, 18 Dec 2025 16:59:29 +0000 Subject: [PATCH] Make multiplications use unsigned to avoid UB on overflow Signed-off-by: Drew Lewis --- src/base/abc/abcAig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/base/abc/abcAig.c b/src/base/abc/abcAig.c index e3f3ce457..78596f800 100644 --- a/src/base/abc/abcAig.c +++ b/src/base/abc/abcAig.c @@ -90,10 +90,10 @@ struct Abc_Aig_t_ static unsigned Abc_HashKey2( Abc_Obj_t * p0, Abc_Obj_t * p1, int TableSize ) { unsigned Key = 0; - Key ^= Abc_ObjRegular(p0)->Id * 7937; - Key ^= Abc_ObjRegular(p1)->Id * 2971; - Key ^= Abc_ObjIsComplement(p0) * 911; - Key ^= Abc_ObjIsComplement(p1) * 353; + Key ^= (unsigned)Abc_ObjRegular(p0)->Id * 7937; + Key ^= (unsigned)Abc_ObjRegular(p1)->Id * 2971; + Key ^= (unsigned)Abc_ObjIsComplement(p0) * 911; + Key ^= (unsigned)Abc_ObjIsComplement(p1) * 353; return Key % TableSize; }