Skip to content
Permalink
Browse files

Fix use after free in 3d point symbol

The value by transform() is going out of scope before its .data()
is used, so the data is pointing to a freed location
  • Loading branch information
nyalldawson committed Jan 28, 2020
1 parent 92de4c7 commit df7979cf94c43352cd10db97c16075b8816ec6c4
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/3d/symbols/qgspoint3dsymbol.cpp
@@ -138,11 +138,8 @@ QString QgsPoint3DSymbol::shapeToString( QgsPoint3DSymbol::Shape shape )

QMatrix4x4 QgsPoint3DSymbol::billboardTransform() const
{

float *md = transform().data();

QMatrix4x4 billboardTransformMatrix;
billboardTransformMatrix.translate( QVector3D( 0, md[13], 0 ) );
billboardTransformMatrix.translate( QVector3D( 0, mTransform.data()[13], 0 ) );

return billboardTransformMatrix;

0 comments on commit df7979c

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