Skip to content

Commit

Permalink
Merge pull request #4609 from mplough-kobold/master
Browse files Browse the repository at this point in the history
ERS: Fix off-by-one error when reading ERS header
  • Loading branch information
rouault authored and github-actions[bot] committed Oct 7, 2021
1 parent bc1ffc4 commit 46a79b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdal/frmts/ers/ershdrnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int ERSHdrNode::ParseChildren( VSILFILE * fp, int nRecLevel )

if( (iOff = osLine.find_first_of( '=' )) != std::string::npos )
{
CPLString osName = iOff == 0 ? std::string() : osLine.substr(0,iOff-1);
CPLString osName = iOff == 0 ? std::string() : osLine.substr(0,iOff);
osName.Trim();

CPLString osValue = osLine.c_str() + iOff + 1;
Expand Down

0 comments on commit 46a79b4

Please sign in to comment.