Skip to content
Permalink
Browse files

Fix possible crash in ept point cloud index if boundsConforming array…

… size != 6 (fixes a typo)
  • Loading branch information
nyalldawson committed Jan 4, 2021
1 parent bcba05d commit 25e54a7a06f077814d1bbfa201584212ba2bc889
Showing with 6 additions and 6 deletions.
  1. +6 −6 src/core/pointcloud/qgseptpointcloudindex.cpp
@@ -92,13 +92,13 @@ bool QgsEptPointCloudIndex::loadSchema( QFile &f )
if ( bounds.size() != 6 )
return false;

const QJsonArray bounds_conforming = result.value( QLatin1String( "boundsConforming" ) ).toArray();
if ( bounds.size() != 6 )
const QJsonArray boundsConforming = result.value( QLatin1String( "boundsConforming" ) ).toArray();
if ( boundsConforming.size() != 6 )
return false;
mExtent.set( bounds_conforming[0].toDouble(), bounds_conforming[1].toDouble(),
bounds_conforming[3].toDouble(), bounds_conforming[4].toDouble() );
mZMin = bounds_conforming[2].toDouble();
mZMax = bounds_conforming[5].toDouble();
mExtent.set( boundsConforming[0].toDouble(), boundsConforming[1].toDouble(),
boundsConforming[3].toDouble(), boundsConforming[4].toDouble() );
mZMin = boundsConforming[2].toDouble();
mZMax = boundsConforming[5].toDouble();

const QJsonArray schemaArray = result.value( QLatin1String( "schema" ) ).toArray();
QgsPointCloudAttributeCollection attributes;

0 comments on commit 25e54a7

Please sign in to comment.
You can’t perform that action at this time.