Changeset: 2b84ced6510a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2b84ced6510a
Modified Files:
        geom/monetdb5/geom_atoms.c
Branch: default
Log Message:

Fixes UB in mbrHASH


diffs (13 lines):

diff --git a/geom/monetdb5/geom_atoms.c b/geom/monetdb5/geom_atoms.c
--- a/geom/monetdb5/geom_atoms.c
+++ b/geom/monetdb5/geom_atoms.c
@@ -456,7 +456,8 @@ BUN
 mbrHASH(const void *ATOM)
 {
        const mbr *atom = ATOM;
-       return (BUN) (((int) atom->xmin * (int)atom->ymin) *((int) atom->xmax * 
(int)atom->ymax));
+       return (BUN) (mix_int(atom->xmin) ^ mix_int(atom->ymin) ^
+                             mix_int(atom->xmax) ^ mix_int(atom->ymax));
 }
 
 const void *
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to