Opened 17 years ago

Last modified 17 years ago

#1352 closed defect (invalid)

segfault in windows if dbf file is opened by other program

Reported by: ari.jolma@… Owned by: warmerdam
Priority: highest Milestone:
Component: OGR_SF Version: 1.3.2
Severity: major Keywords:
Cc:

Description

DBFIsRecordDeleted in ogrshapelayer:392 segafaults if the DBF file of the shapefile is opened in Excel for example, when OGR tries to read it.

Change History (1)

comment:1 by warmerdam, 17 years ago

Ari,

This is already fixed in the development version.  Change:

            if( DBFIsRecordDeleted( hDBF, iNextShapeId ) )

to:

            if( hDBF && DBFIsRecordDeleted( hDBF, iNextShapeId ) )

Note that if the file is open in excell it won't be readable by OGR
so you are really just getting the shapes, and no attributes.
Note: See TracTickets for help on using tickets.