Ticket #3665 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

crash on corrupt shape file

Reported by: jef Owned by: 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 [ #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

diff Download (0.8 KB) - added by jef 3 years ago.

Change History

Changed 3 years ago by jef

  • attachment diff Download added

Changed 3 years ago by rouault

  • owner changed from warmerdam to rouault

Changed 3 years ago by rouault

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

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

Changed 3 years ago by rouault

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.