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.
This commit is contained in:
Lukas Tönne 2016-06-21 12:51:18 +02:00
parent 1abf7dd835
commit 8dec4a0e79
1 changed files with 2 additions and 2 deletions

View File

@ -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 + ")";