Opened 16 years ago

Last modified 16 years ago

#175 closed defect (fixed)

OGRLayer::GetFeature(id) crashed when feature associated with id does not exist

Reported by: conly@… Owned by: warmerdam
Priority: high Milestone:
Component: default Version: unspecified
Severity: normal Keywords:
Cc:

Description

When I used OGRLayer::GetFeature() to retrieve a feature that does not exist,
the program crashed. It looks like the DBFNullAttribute tries to find the length
of a NULL string.

Change History (1)

comment:1 Changed 16 years ago by warmerdam

I have corrected gdal/ogr/ogrsf_frmts/shape/shape2ogr.cpp to check the fid, 
and return NULL if it is out of range. 
This seems to have corrected the problem.

Note: See TracTickets for help on using tickets.