diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-13 15:52:04 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-05-13 15:52:04 +0400 |
commit | 356d4c3085bcff1664cdf1d57ac325323d66e519 (patch) | |
tree | ba40c10cf1d3dbcda366d6f0cdba99032f1aeaa1 /source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp | |
parent | e40d403e43972109a57ff705ff29da60dfa6808d (diff) |
Fix #35330: Blur node crash due to size overflow
Issue was caused by too hight value used for size,
which came from infinite Z-buffer point.
Solved the crash by clamoing maximal gaussian table
radius to 30K, which seems to be reasonable.
Diffstat (limited to 'source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp index 7bf85a953f4..0a2e8aeeba8 100644 --- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp @@ -53,8 +53,7 @@ void GaussianYBlurOperation::initExecution() if (this->m_sizeavailable) { float rad = this->m_size * this->m_data->sizey; - if (rad < 1) - rad = 1; + CLAMP(rad, 1.0f, MAX_GAUSSTAB_RADIUS); this->m_rad = rad; this->m_gausstab = BlurBaseOperation::make_gausstab(rad); @@ -66,8 +65,7 @@ void GaussianYBlurOperation::updateGauss() if (this->m_gausstab == NULL) { updateSize(); float rad = this->m_size * this->m_data->sizey; - if (rad < 1) - rad = 1; + CLAMP(rad, 1.0f, MAX_GAUSSTAB_RADIUS); this->m_rad = rad; this->m_gausstab = BlurBaseOperation::make_gausstab(rad); |