gs:DownloadEstimator should check size is less than Integer.MAX_VALUE

Description

The gsownloadEstimator process only checks the requested size against the configured raster size limit, without worrying to check that it is also a valid Integer value.

If one raises the raster size limit above Integer.MAX_VALUE in the configuration and tries to download a huge image (e.g. 100,000 * 60,000), the estimator will say the request is ok, but the actual download will throw an exception:

At the very least, the estimator should return false if the requested image size is above Integer.MAX_VALUE.

Environment

None

Activity

Show:
Stefano Costa
October 6, 2015, 5:20 PM

Backported also to 2.8.x branch. Backport to 2.7.x branch would need a backport of as well.

Stefano Costa
October 6, 2015, 5:21 PM

The fix is not to be seen as a definitive solution to the problem, just as a bare minimum sanity check, as OOM exceptions may still occur and cause the actual download to fail, even if the estimator said it was OK to download.

Andrea Aime
February 15, 2017, 11:48 AM

Mass closing all resolved issues not modified in the last 4 weeks

Fixed

Assignee

Stefano Costa

Reporter

Stefano Costa

Triage

None

Fix versions

Affects versions

Components

Priority

Medium