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
committerKévin Dietrich <kevin.dietrich@mailoo.org>2021-10-20 21:03:17 +0300
commit010e675b1b436a824a3149dd478a1c8f4191fe42 (patch)
tree5511bfd73e885fec46ff674e00f8c9c6d22fde47 /source/blender/blenlib/intern
parent1de837437498f25997fa69df152529fe92a51f5c (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.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 bd733aca4f1..798eb60f64d 100644
--- a/source/blender/blenlib/intern/string_utils.c
+++ b/source/blender/blenlib/intern/string_utils.c
@@ -469,6 +469,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;
}