Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2021-10-20 14:20:44 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-02 14:50:31 +0300
commit554b1b1663aa92478c7f7ed68c2cfe9a58b9ba0d (patch)
tree3143c2a4afdb0c90a4cd902d9d6dfaec9db216e4
parent272cb6157d8271008d576e92b593b69b6c93fa2e (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.
-rw-r--r--source/blender/blenlib/intern/string_utils.c1
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;
}