Opened 11 years ago

Closed 9 years ago

#5005 closed defect (worksforme)

[PATCH] gdal2tiles crashes on some inputs

Reported by: kenshi Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: 1.9.2
Severity: normal Keywords: gdal2tiles
Cc:

Description

I found an existing report of this happening. http://lists.osgeo.org/pipermail/gdal-dev/2011-December/031154.html

For some reason, gdal2tiles is trying to fetch rows/columns of size 0 from the input dataset, which causes errors to be printed in ReadRaster(), but returns None data. The crash only happens in WriteRaster when data is passed in - it expects a string buffer but instead it get's the None returned by ReadRaster().

I have a fix, although I don't fully understand the root cause.

Attached is the patch file and image that causes the problem.

:> diff -w -u swig/python/scripts/gdal2tiles.py gdal2tiles.py > gdal2tiles.patch

Attachments (2)

gdal2tiles.patch (1.4 KB ) - added by kenshi 11 years ago.
file that crashes gdal2tiles
gdal2tiles_crash.tif.gz (91.5 KB ) - added by kenshi 11 years ago.

Download all attachments as: .zip

Change History (4)

by kenshi, 11 years ago

Attachment: gdal2tiles.patch added

file that crashes gdal2tiles

by kenshi, 11 years ago

Attachment: gdal2tiles_crash.tif.gz added

comment:1 by Even Rouault, 11 years ago

Summary: gdal2tiles crashes on some inputs[PATCH] gdal2tiles crashes on some inputs

comment:2 by Jukka Rahkonen, 9 years ago

Resolution: worksforme
Status: newclosed

No crash for me with GDAL 2.0-dev 32-bit, Python 2.7, on Windows 7.

Note: See TracTickets for help on using tickets.