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:
parent
1abf7dd835
commit
8dec4a0e79
|
@ -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 + ")";
|
||||
|
|
Loading…
Reference in New Issue