Opened 12 years ago

Closed 12 years ago

#4744 closed defect (fixed)

gdal_rasterize Segmentation Fault on Shapefile with No Features

Reported by: heksterb Owned by: warmerdam
Priority: normal Milestone: 1.9.2
Component: Utilities Version: 1.8.0
Severity: normal Keywords: gdal_rasterize
Cc:

Description

Executing the following command line:

gdal_rasterize -q -i -ot Byte -burn 255 -l empty -te 41.0 28.2 41.2 28.4 -ts 40032 29392 empty.shp output.tif

where 'empty.shp' is a Shapefile with no features, will cause 'gdal_rasterize' to segmentation fault. This is similar to the problem fixed in changeset 18437, except that that deals with the case where there are features, but the feature has no geometries.

Attachments (3)

empty.shp (100 bytes ) - added by heksterb 12 years ago.
Shapefile with no features
empty.shx (100 bytes ) - added by heksterb 12 years ago.
empty.dbf (65 bytes ) - added by heksterb 12 years ago.

Download all attachments as: .zip

Change History (4)

by heksterb, 12 years ago

Attachment: empty.shp added

Shapefile with no features

by heksterb, 12 years ago

Attachment: empty.shx added

by heksterb, 12 years ago

Attachment: empty.dbf added

comment:1 by Even Rouault, 12 years ago

Component: defaultUtilities
Keywords: gdal_rasterize added
Milestone: 1.9.2
Resolution: fixed
Status: newclosed

r24682 /trunk/gdal/apps/gdal_rasterize.cpp: gdal_rasterize: fix segfault in -i case when the datasource has no feature (#4744)

r24683 /branches/1.9/gdal/apps/gdal_rasterize.cpp: gdal_rasterize: fix segfault in -i case when the datasource has no feature (#4744)

Note: See TracTickets for help on using tickets.