From 38e7b7cce066905ab07a21b48412bf1c644c87ad Mon Sep 17 00:00:00 2001 From: Matt Amos Date: Fri, 10 Feb 2012 15:21:02 +0000 Subject: [PATCH] Still need to increment pos counter in shapeindex even when the geometry is null, otherwise reads are possible beyond the end of file. --- utils/shapeindex/shapeindex.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/shapeindex/shapeindex.cpp b/utils/shapeindex/shapeindex.cpp index 7777189b9..a5ba5ca81 100644 --- a/utils/shapeindex/shapeindex.cpp +++ b/utils/shapeindex/shapeindex.cpp @@ -165,6 +165,9 @@ int main (int argc,char** argv) box2d item_ext; if (shape_type==shape_io::shape_null) { + // still need to increment pos, or the pos counter + // won't indicate EOF until too late. + pos+=4+content_length; continue; } else if (shape_type==shape_io::shape_point)