diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-10-20 14:20:44 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-11-02 14:50:31 +0300 |
commit | 554b1b1663aa92478c7f7ed68c2cfe9a58b9ba0d (patch) | |
tree | 3143c2a4afdb0c90a4cd902d9d6dfaec9db216e4 /source/blender/blenlib/intern | |
parent | 272cb6157d8271008d576e92b593b69b6c93fa2e (diff) |
Fix missing null-terminator in BLI_string_join_arrayN
Although the documentation says so, the null-terminator was missing.
This could cause crashes when logging shader linking errors as shader
sources are empty in this case.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/string_utils.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/string_utils.c b/source/blender/blenlib/intern/string_utils.c index c847f7e1921..2a7e4478de3 100644 --- a/source/blender/blenlib/intern/string_utils.c +++ b/source/blender/blenlib/intern/string_utils.c @@ -470,6 +470,7 @@ char *BLI_string_join_arrayN(const char *strings[], uint strings_len) for (uint i = 0; i < strings_len; i++) { c += BLI_strcpy_rlen(c, strings[i]); } + *c = '\0'; return result; } |