diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2019-03-24 12:56:09 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2019-03-24 12:56:09 +0100 |
| commit | 36beda51b769f1e61c33d8230a4718b2bdc6fe46 (patch) | |
| tree | ea053a73c8c8337a3836e0420324e30b2bd0b9b7 /src | |
| parent | d089e17fde8a636198cf21f1045fc6bee20d987d (diff) | |
| download | PROJ-36beda51b769f1e61c33d8230a4718b2bdc6fe46.tar.gz PROJ-36beda51b769f1e61c33d8230a4718b2bdc6fe46.zip | |
isea: really fix integer overflow of https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2390
Diffstat (limited to 'src')
| -rw-r--r-- | src/projections/isea.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<int>::max() || - fabs(rx + ry + rz) > std::numeric_limits<int>::max() ) { + if( fabs((double)ix + iy) > std::numeric_limits<int>::max() || + fabs((double)ix + iy + iz) > std::numeric_limits<int>::max() ) { throw "Integer overflow"; } |
