Skip to content

Commit

Permalink
Merge pull request #4614 from OSGeo/backport-4609-to-release/3.3
Browse files Browse the repository at this point in the history
[Backport release/3.3] ERS: Fix off-by-one error when reading ERS header
  • Loading branch information
rouault authored Oct 7, 2021
2 parents bc1ffc4 + 46a79b4 commit 38e2490
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 38e2490

Please sign in to comment.