mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
Fix potential crash in QGIS server
This commit is contained in:
parent
f2e8f2df06
commit
63208a2225
@ -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 )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user