Ticket #2429 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

Division by zero in GDALGetRandomRasterSample

Reported by: rouault Assigned to: warmerdam
Priority: normal Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:
Cc:

Description

In r14723, I commited a workaround to avoid the crash, but I'm not sure this is the best thing we can do.

To reproduce that, run the new commandline utility "gdaltorture" on ../autotest/gcore/data/sasha.tif for example.

Change History

06/21/08 22:33:21 changed by warmerdam

  • status changed from new to closed.
  • resolution set to fixed.

I applied a different change that might oversample, but this is harmless since we limit the total samples to the size of the buffer later on (r14750 in trunk).

I have not bothered to back port this since I assume it is an esoteric rather than a practical issue. But the change could be backported if desired.