diff options
author | Max Horn | 2003-09-06 20:36:29 +0000 |
---|---|---|
committer | Max Horn | 2003-09-06 20:36:29 +0000 |
commit | d520f2f44cebdb05d4923e38c804d59b8f41ae44 (patch) | |
tree | 33c1c103757a718d1ffde870800a2435670b0446 | |
parent | fb4b0ef8e442a13f40e1001a2af25002a90ccdfd (diff) | |
download | scummvm-rg350-d520f2f44cebdb05d4923e38c804d59b8f41ae44.tar.gz scummvm-rg350-d520f2f44cebdb05d4923e38c804d59b8f41ae44.tar.bz2 scummvm-rg350-d520f2f44cebdb05d4923e38c804d59b8f41ae44.zip |
Patch #790433: Fix potential buffer overflow
svn-id: r10049
-rw-r--r-- | scumm/verbs.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index c5981a1f10..dbe39660fa 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -231,8 +231,8 @@ void Scumm::redrawV2Inventory() { // Prevent inventory entries from overflowing by truncating the text // after 144/8 = 18 chars byte msg[18 + 1]; - memcpy(msg, _messagePtr, 18), msg[18] = 0; + strncpy((char *)msg, (const char *)_messagePtr, 18); _messagePtr = msg; // Draw it |