diff options
author | Manuel Castilla <manzanillawork@gmail.com> | 2021-09-29 22:42:46 +0300 |
---|---|---|
committer | Manuel Castilla <manzanillawork@gmail.com> | 2021-10-01 00:56:53 +0300 |
commit | f3274bfa70f0bb24e8f4d8cdd8393babddbf986c (patch) | |
tree | 681655d944809cbeef9d3fe258fa91539bb6d5e3 | |
parent | 4569d9c0c3b046a412d54cc008d9d2a4be909ee1 (diff) |
Compositor: Fix Dilate/Erode node crash with Step option
It was writing the buffer out of bounds.
Only "Full Frame" mode was affected.
-rw-r--r-- | source/blender/compositor/operations/COM_DilateErodeOperation.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_DilateErodeOperation.cc b/source/blender/compositor/operations/COM_DilateErodeOperation.cc index 28b40021cd9..b7fd714ba5b 100644 --- a/source/blender/compositor/operations/COM_DilateErodeOperation.cc +++ b/source/blender/compositor/operations/COM_DilateErodeOperation.cc @@ -783,7 +783,8 @@ static void step_update_memory_buffer(MemoryBuffer *output, start = half_window + (i - 1) * window + 1; for (int y = -MIN2(0, start); y < window - MAX2(0, start + window - bheight); y++) { - result.get_value(x, y + start + area.ymin, 0) = selector(temp[y], temp[y + window - 1]); + result.get_value(x + area.xmin, y + start + area.ymin, 0) = selector(temp[y], + temp[y + window - 1]); } } } |