From 15a85172b778c3d57adb0e4e61842c0a4bcb4e44 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 17 Sep 2019 21:08:41 +0200 Subject: isea: avoid undefined behaviour on left shift of negative value. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15009 --- src/projections/isea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/projections/isea.cpp') diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp index c22e143d..d1aeab4a 100644 --- a/src/projections/isea.cpp +++ b/src/projections/isea.cpp @@ -902,7 +902,7 @@ static int isea_hex(struct isea_dgg *g, int tri, { throw "Invalid shift"; } - hex->x = ((int)v.x << 4) + quad; + hex->x = ((int)v.x * 16) + quad; hex->y = v.y; return 1; -- cgit v1.2.3