AGI: Fix possible buffer overflow.
This is based on patch #3085298 "overflows in agi and parallaction". svn-id: r53147
This commit is contained in:
parent
c3366755ef
commit
cc0afa92b3
1 changed files with 2 additions and 3 deletions
|
@ -461,9 +461,8 @@ bool AgiEngine::predictiveDialog() {
|
||||||
}
|
}
|
||||||
|
|
||||||
press:
|
press:
|
||||||
strncpy(_predictiveResult, prefix.c_str(), 40);
|
Common::strlcpy(_predictiveResult, prefix.c_str(), sizeof(_predictiveResult));
|
||||||
strncat(_predictiveResult, _currentWord.c_str(), 40);
|
Common::strlcat(_predictiveResult, _currentWord.c_str(), sizeof(_predictiveResult));
|
||||||
_predictiveResult[prefix.size() + _currentCode.size() + 1] = 0;
|
|
||||||
|
|
||||||
getout:
|
getout:
|
||||||
// if another window was shown, bring it up again
|
// if another window was shown, bring it up again
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue