[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl' - vcl/opengl
Michael Meeks
michael.meeks at collabora.com
Tue Nov 11 03:18:59 PST 2014
vcl/opengl/scale.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit c93f1db44282a9896b55b091877ca4678c44315c
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Nov 11 11:19:04 2014 +0000
vcl: avoid opengl kernel creation writing over its buffers.
Change-Id: I90486137323afc03a23afa6c18c27840fe8456e1
diff --git a/vcl/opengl/scale.cxx b/vcl/opengl/scale.cxx
index 16710b4..ccacfc4 100644
--- a/vcl/opengl/scale.cxx
+++ b/vcl/opengl/scale.cxx
@@ -128,6 +128,10 @@ void OpenGLSalBitmap::ImplCreateKernel(
aNumberOfContributions = (static_cast< sal_uInt32 >(fabs(ceil(fScaledRadius))) * 2) + 1 - 6;
aKernelSize = aNumberOfContributions / 2 + 1;
+ // avoid a crash for now; re-think me.
+ if (aKernelSize > 16)
+ aKernelSize = 16;
+
pWeights = new GLfloat[16];
memset( pWeights, 0, 16 * sizeof( GLfloat ) );
More information about the Libreoffice-commits
mailing list