Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#3665 closed defect (fixed)

crash on corrupt shape file

Reported by: jef Owned by: Even Rouault
Priority: normal Milestone: 1.7.3
Component: OGR_SF Version: 1.7.2
Severity: normal Keywords:
Cc:

Description

OGR crashes on an corrupt shape file when a filter is applied (see also http://trac.osgeo.org/qgis/ticket/2837 #2837):

ogrinfo -spat -24000.593000 40999.080078 -22399.520000 41250.060120 pen_01.shp pen_01
INFO: Open of `pen_01.shp'
      using driver `ESRI Shapefile' successful.

Layer name: pen_01
Geometry: Line String
ERROR 1: Corrupted .shp file : shape 3 : panPartStart[4] = 10, panPartStart[3] = 229
Segmentation fault (core dumped)

The attached patch fixes it.

Attachments (1)

diff (827 bytes ) - added by jef 14 years ago.

Download all attachments as: .zip

Change History (4)

by jef, 14 years ago

Attachment: diff added

comment:1 by Even Rouault, 14 years ago

Owner: changed from warmerdam to Even Rouault

comment:2 by Even Rouault, 14 years ago

Resolution: fixed
Status: newclosed

Fixed in trunk (r19936) and in branches/1.7 (r19937). Thanks

comment:3 by Even Rouault, 14 years ago

Change fix for #3665 to return a feature without geometry instead of a NULL feature : in trunk (r19940) and in branches/1.7 (r19941). Test added in r19442. That way we're consistant with the behaviour of GetNextFeature() with no spatial filter

Note: See TracTickets for help on using tickets.