Skip to content
Permalink
Browse files

Fix potential crash in QGIS server

  • Loading branch information
nyalldawson committed May 2, 2016
1 parent f2e8f2d commit 63208a2225881254805d3ff530c0c5e1170a54b4
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/core/qgsogcutils.cpp
@@ -1148,7 +1148,16 @@ QDomElement QgsOgcUtils::geometryToGML( const QgsGeometry* geometry, QDomDocumen
bool hasZValue = false;

QgsConstWkbPtr wkbPtr( geometry->asWkb(), geometry->wkbSize() );
wkbPtr.readHeader();
try
{
wkbPtr.readHeader();
}
catch ( const QgsWkbException &e )
{
Q_UNUSED( e );
// WKB exception while reading header
return QDomElement();
}

if ( gmlVersion != GML_2_1_2 )
{

0 comments on commit 63208a2

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