diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2016-06-21 13:51:18 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2016-06-21 13:51:18 +0300 |
commit | 8dec4a0e7935f4dde9d64a370b860ab0a1cf582e (patch) | |
tree | ae48751992d663a6d5c61cb73b8fb7c387b66856 /source/blender | |
parent | 1abf7dd83509b61d16589c5b12b3a2b941bab79f (diff) |
Fix for string buffer overflow in DepsNode identifiers.
Layer flags can go up to 2^n-1 for n layers, requiring *at least* 9 chars + 1 terminator for 20 layers.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/depsgraph/intern/nodes/deg_node_component.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc index f5f45dde519..6ac45c99798 100644 --- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc +++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc @@ -116,10 +116,10 @@ string ComponentDepsNode::identifier() const { string &idname = this->owner->name; - char typebuf[7]; + char typebuf[16]; sprintf(typebuf, "(%d)", type); - char layers[7]; + char layers[16]; sprintf(layers, "%d", this->layers); return string(typebuf) + name + " : " + idname + " (Layers: " + layers + ")"; |