diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2014-04-29 00:00:44 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2014-04-29 00:06:53 +0400 |
commit | 5d51de3bea3ae500446587ebfc53c297afdbed82 (patch) | |
tree | bbb6a42fed4199908ac13f576cfe2b18068d0043 /source/blender/compositor | |
parent | 7712d86512530e6f7716530b7bbb17658f45affa (diff) |
Fix T39539
Initialization of not initialized memory when accessing the renderlayer
directly
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index e7cda208319..af0d1b0b4f4 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -81,8 +81,16 @@ void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, Pi case COM_PS_NEAREST: { int ix = x; int iy = y; - if (ix < 0 || iy < 0 || ix >= width || iy >= height) + if (ix < 0 || iy < 0 || ix >= width || iy >= height) { + if (this->m_elementsize == 1) + output[0] = 0.0f; + else if (this->m_elementsize == 3) + zero_v3(output); + else + zero_v4(output); break; + + } offset = (iy * width + ix) * this->m_elementsize; |