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:
-rw-r--r--source/blender/compositor/intern/COM_Debug.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/compositor/intern/COM_Debug.cc b/source/blender/compositor/intern/COM_Debug.cc
index 50a69e55b2b..8525e2fde50 100644
--- a/source/blender/compositor/intern/COM_Debug.cc
+++ b/source/blender/compositor/intern/COM_Debug.cc
@@ -431,8 +431,9 @@ void DebugInfo::graphviz(const ExecutionSystem *system, StringRefNull name)
if (!COM_EXPORT_GRAPHVIZ) {
return;
}
- char str[1000000];
- if (graphviz_system(system, str, sizeof(str) - 1)) {
+ const int max_textlength = 1000000;
+ char *str = (char *)MEM_mallocN(max_textlength, __func__);
+ if (graphviz_system(system, str, max_textlength - 1)) {
char basename[FILE_MAX];
char filename[FILE_MAX];
@@ -451,6 +452,7 @@ void DebugInfo::graphviz(const ExecutionSystem *system, StringRefNull name)
fputs(str, fp);
fclose(fp);
}
+ MEM_freeN(str);
}
static std::string get_operations_export_dir()