From 36beda51b769f1e61c33d8230a4718b2bdc6fe46 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 24 Mar 2019 12:56:09 +0100 Subject: isea: really fix integer overflow of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2390 --- src/projections/isea.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/projections/isea.cpp b/src/projections/isea.cpp index 7dc890e0..18b1cf55 100644 --- a/src/projections/isea.cpp +++ b/src/projections/isea.cpp @@ -105,8 +105,8 @@ static void hexbin2(double width, double x, double y, long *i, long *j) { iy = lround(ry); rz = floor(z + 0.5); iz = lround(rz); - if( fabs(rx + ry) > std::numeric_limits::max() || - fabs(rx + ry + rz) > std::numeric_limits::max() ) { + if( fabs((double)ix + iy) > std::numeric_limits::max() || + fabs((double)ix + iy + iz) > std::numeric_limits::max() ) { throw "Integer overflow"; } -- cgit v1.2.3