diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-08 17:16:45 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-08 17:16:45 +0300 |
commit | 17971b8a5be8779e26621b24efa09893cdccb112 (patch) | |
tree | 354f74b85508f4652bc9a7ee2f0c2f55fd6d4130 /source | |
parent | 9e393fc2f12583d32dddf00bad8174d2bb06b61d (diff) |
Fix: Heap buffer overflow in new curves set type node
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc index 6c95ab3bdc9..0a4078772b9 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_spline_type.cc @@ -566,11 +566,9 @@ static void convert_to_nurbs(const CurveComponent &src_component, /* Avoid using "Endpoint" knots modes for cyclic curves, since it adds a sharp point at the * start/end. */ if (src_cyclic.is_single()) { - bke::curves::fill_points<int8_t>(dst_curves, - selection, - src_cyclic.get_internal_single() ? NURBS_KNOT_MODE_NORMAL : - NURBS_KNOT_MODE_ENDPOINT, - dst_curves.nurbs_knots_modes_for_write()); + dst_curves.nurbs_knots_modes_for_write().fill_indices( + selection, + src_cyclic.get_internal_single() ? NURBS_KNOT_MODE_NORMAL : NURBS_KNOT_MODE_ENDPOINT); } else { VArray_Span<bool> cyclic{src_cyclic}; |