2483c19ad33f03c83e9a9561825670c3ee09119e
The length passed to IDP_NewString included the nil terminator unlike IDP_AssignString. Callers to IDP_AssignString from MOD_nodes.cc passed in an invalid size for e.g. There where also callers passing in the strlen(..) of the value unnecessarily. Resolve with the following changes: - Add `*MaxSize()` versions of IDP_AssignString & IDP_NewString which take a size argument. - Remove the size argument from the existing functions as most callers don't need to clamp the length of the string, avoid calculating & passing in length values when they're unnecessary. - When clamping the size is needed, both functions now include the nil byte in the size since this is the convention for BLI_string and other BLI API's dealing with nil terminated strings, it avoids having to pass in `sizeof(value) - 1`.
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
