BLF_str_offset_from_cursor_position is being called with a str_len of INT_MAX, so max buffer size instead of string length. This works fine right now but will not when this gets more complex. For example if we need to call functions like BLI_str_cursor_step_next_utf8, which assumes that str_len is the actual end of the string. Pull Request: https://projects.blender.org/blender/blender/pulls/121966