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:
authorCampbell Barton <ideasman42@gmail.com>2020-01-27 05:43:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-01-27 05:43:32 +0300
commitb2769562ee215d72ab627edb9027ed39a0fa4c1b (patch)
tree49adad915f0e05a1435227819491308c437d394d /source/blender/makesdna
parentb59adcaa3683ecba90bfab0b91d13f86bbf4f335 (diff)
parent9a8dd37d1aa9d3d67a59ab509fe83402ba8fc964 (diff)
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/intern/makesdna.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c
index dc32ca7e244..6b4b4854515 100644
--- a/source/blender/makesdna/intern/makesdna.c
+++ b/source/blender/makesdna/intern/makesdna.c
@@ -942,7 +942,11 @@ static int calculate_struct_sizes(int firststruct, FILE *file_verify, const char
/* Write size verification to file. */
{
- char *name_static = alloca(namelen + 1);
+ /* Normally 'alloca' would be used here, however we can't in a loop.
+ * Use an over-sized buffer instead. */
+ char name_static[1024];
+ BLI_assert(sizeof(name_static) > namelen);
+
DNA_elem_id_strip_copy(name_static, cp);
const char *str_pair[2] = {types[structtype], name_static};
const char *name_alias = BLI_ghash_lookup(g_version_data.elem_map_alias_from_static,