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:
|
||||
strncpy(_predictiveResult, prefix.c_str(), 40);
|
||||
strncat(_predictiveResult, _currentWord.c_str(), 40);
|
||||
_predictiveResult[prefix.size() + _currentCode.size() + 1] = 0;
|
||||
Common::strlcpy(_predictiveResult, prefix.c_str(), sizeof(_predictiveResult));
|
||||
Common::strlcat(_predictiveResult, _currentWord.c_str(), sizeof(_predictiveResult));
|
||||
|
||||
getout:
|
||||
// if another window was shown, bring it up again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue