Skip to content

Commit

Permalink
ISO8211: reject invalid record to avoid later assertion
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.osgeo.org/gdal/trunk@32852 f0d54148-0727-0410-94bb-9a71ac55c965
  • Loading branch information
rouault committed Jan 8, 2016
1 parent ff86c5f commit 9e5650f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gdal/frmts/iso8211/ddfrecord.cpp
Expand Up @@ -358,6 +358,12 @@ int DDFRecord::ReadHeader()
"Didn't find field terminator, read one more byte." );
}

if( nFieldOffset >= nDataSize )
{
CPLError(CE_Failure, CPLE_AssertionFailed, "nFieldOffset < nDataSize");
return FALSE;
}

/* -------------------------------------------------------------------- */
/* Loop over the directory entries, making a pass counting them. */
/* -------------------------------------------------------------------- */
Expand Down

0 comments on commit 9e5650f

Please sign in to comment.