From 010e675b1b436a824a3149dd478a1c8f4191fe42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dietrich?= Date: Wed, 20 Oct 2021 13:20:44 +0200 Subject: 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. --- source/blender/blenlib/intern/string_utils.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source') 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; } -- cgit v1.2.3