[Libreoffice-commits] core.git: vcl/opengl

Michael Meeks michael.meeks at collabora.com
Tue Nov 11 04:50:10 PST 2014


 vcl/opengl/scale.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit feb93d45e872cce23e358527d264693dbbd47607
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