mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-07 10:48:43 +00:00
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
@ -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…
x
Reference in New Issue
Block a user