Anim: fix unsafe use of BLI_snprintf_rlen() in the NLA drawing code

Replace `BLI_snprintf_rlen()` with `STRNCPY_RLEN()`, as the string to
copy is not actually a printf-style format string, but just a plain string.

Pull Request: https://projects.blender.org/blender/blender/pulls/124228
This commit is contained in:
Sybren A. Stüvel
2024-07-05 13:39:05 +02:00
parent 46743e8e3f
commit b33ad47ee0

View File

@@ -631,7 +631,7 @@ static void nla_draw_strip_text(AnimData *adt,
/* just print the name and the range */
if (strip->flag & NLASTRIP_FLAG_TEMP_META) {
str_len = BLI_snprintf_rlen(str, sizeof(str), DATA_("Temp-Meta"));
str_len = STRNCPY_RLEN(str, DATA_("Temp-Meta"));
}
else {
str_len = STRNCPY_RLEN(str, strip->name);