Skip to content

Commit

Permalink
Merge pull request #3645 from nirvn/linefillpattern_fix
Browse files Browse the repository at this point in the history
[symbology] prevent creation of a zero width/height line pattern image (fixes #15728)
  • Loading branch information
nyalldawson committed Oct 20, 2016
2 parents 8c7d772 + 3212d39 commit 3bdc77d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/symbology-ng/qgsfillsymbollayer.cpp
Expand Up @@ -2654,7 +2654,8 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext&
width += 2 * xBuffer;
height += 2 * yBuffer;

if ( width > 10000 || height > 10000 ) //protect symbol layer from eating too much memory
//protect from zero width/height image and symbol layer from eating too much memory
if ( width > 10000 || height > 10000 || width == 0 || height == 0 )
{
return;
}
Expand Down

0 comments on commit 3bdc77d

Please sign in to comment.