Skip to content

Commit

Permalink
also verify wkbSize in QgsGeometry::exportToWkt
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 6, 2013
1 parent b35a456 commit 1fe82b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsgeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4569,9 +4569,9 @@ QString QgsGeometry::exportToWkt()
exportGeosToWkb();
}

if ( !mGeometry )
if ( !mGeometry || wkbSize() < 5 )
{
QgsDebugMsg( "WKB geometry not available!" );
QgsDebugMsg( "WKB geometry not available or too short!" );
return QString::null;
}

Expand Down

0 comments on commit 1fe82b2

Please sign in to comment.