Ticket #615 (closed defect: fixed)
infinite recursive call when GetNextFeature from a empty mitab file with a filter.
| Reported by: | clear@… | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | OGR_SF | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I have a empty MapInfo TAB file, there is no feature in it.
When I use SetSpatialFilter set a filter for it, GetNextFeature output many
error message like this:
ERROR 3: InitBlockFromData(): Invalid Block Type: got 0 expected 2
ERROR 1: ReadBytes(): Attempt to read past end of data block.
ERROR 1: ReadBytes(): Attempt to read past end of data block.
ERROR 1: ReadBytes(): Attempt to read past end of data block.
...
There is an error in file ogr/ogrsf_frmts/mitab/mitab_mapfile.cpp, this is patch:
Index: ogr/ogrsf_frmts/mitab/mitab_mapfile.cpp
===================================================================
RCS file: /cvs/maptools/cvsroot/gdal/ogr/ogrsf_frmts/mitab/mitab_mapfile.cpp,v
retrieving revision 1.18
diff -u -r1.18 mitab_mapfile.cpp
--- ogr/ogrsf_frmts/mitab/mitab_mapfile.cpp 7 Jul 2004 20:54:55 -0000 1.18
+++ ogr/ogrsf_frmts/mitab/mitab_mapfile.cpp 22 Sep 2004 03:52:26 -0000
@@ -560,7 +560,7 @@
CPLAssert( m_poSpIndex == NULL && m_poSpIndexLeaf == NULL );
if( PushBlock( m_poHeader->m_nFirstIndexBlock ) == NULL )
- return -1;
+ return FALSE;
if( m_poSpIndex == NULL )
{
This patch can avoid infinite recursion, but still an error message remained.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

