From 51c8d53a7d0e1dfa151482420e2b19ae2ee10c9b Mon Sep 17 00:00:00 2001 From: Habib Gahbiche Date: Thu, 28 Jan 2021 10:43:29 +0100 Subject: Fix T84512: Crash if size input of Blur node is too large Gaussian filter with a too large kernel doesn't make much sense. This commit caps the Gaussian function radius to MAX_GAUSSTAB_RADIUS. Reviewed By: sergey Maniphest Tasks: T84512 Differential Revision: https://developer.blender.org/D10122 --- source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp') diff --git a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp index f1bc8751329..7a0dff73941 100644 --- a/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianAlphaYBlurOperation.cpp @@ -60,6 +60,7 @@ void GaussianAlphaYBlurOperation::updateGauss() if (this->m_gausstab == nullptr) { updateSize(); float rad = max_ff(m_size * m_data.sizey, 0.0f); + rad = min_ff(rad, MAX_GAUSSTAB_RADIUS); m_filtersize = min_ii(ceil(rad), MAX_GAUSSTAB_RADIUS); m_gausstab = BlurBaseOperation::make_gausstab(rad, m_filtersize); -- cgit v1.2.3