dtprintinfo: Coverity (memory corruption, moderate)

This commit is contained in:
Jon Trulson
2014-12-26 17:17:06 -07:00
parent b881408be0
commit a5c7512782
2 changed files with 11 additions and 10 deletions

View File

@@ -417,7 +417,7 @@ boolean BaseObj::SendAction(Action *action,
{
_lastActionStatus = -1;
int len = strlen("'%s' is not an action of %s") +
strlen(ObjectClassName()) + strlen(action->ReferenceName);
strlen(ObjectClassName()) + strlen(action->ReferenceName) + 1;
_lastActionOutput = new char [len];
sprintf(_lastActionOutput, "'%s' is not an action of %s",
ObjectClassName(), action->ReferenceName);