aboutsummaryrefslogtreecommitdiff
path: root/engines/tony
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-04 20:46:43 +0200
committerEugene Sandulenko2016-05-04 21:15:51 +0200
commit534f723fa55197a0402400af85d86cafe1c5934d (patch)
tree930a5e22e166a6b5d8b7bded986832852607b6ec /engines/tony
parentf6444a03d2df7c7455f908494ca0b633f7da706a (diff)
downloadscummvm-rg350-534f723fa55197a0402400af85d86cafe1c5934d.tar.gz
scummvm-rg350-534f723fa55197a0402400af85d86cafe1c5934d.tar.bz2
scummvm-rg350-534f723fa55197a0402400af85d86cafe1c5934d.zip
TONY: Fix buffer overrun
Diffstat (limited to 'engines/tony')
-rw-r--r--engines/tony/mpal/loadmpc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp
index 8d030f1e52..01892a40e6 100644
--- a/engines/tony/mpal/loadmpc.cpp
+++ b/engines/tony/mpal/loadmpc.cpp
@@ -331,7 +331,7 @@ static const byte *parseItem(const byte *lpBuf, LpMpalItem lpmiItem) {
byte len = *lpBuf;
lpBuf++;
- memcpy(lpmiItem->_lpszDescribe, lpBuf, MIN((byte)127, len));
+ memcpy(lpmiItem->_lpszDescribe, lpBuf, MIN((byte)MAX_DESCRIBE_SIZE, len));
lpBuf += len;
if (len >= MAX_DESCRIBE_SIZE)