[Scummvm-cvs-logs] CVS: scummvm/scumm verbs.cpp,1.75,1.76
Max Horn
fingolfin at users.sourceforge.net
Sat Sep 6 13:37:04 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv18893
Modified Files:
verbs.cpp
Log Message:
Patch #790433: Fix potential buffer overflow
Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- verbs.cpp 29 Aug 2003 07:07:55 -0000 1.75
+++ verbs.cpp 6 Sep 2003 20:36:29 -0000 1.76
@@ -231,8 +231,8 @@
// 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
More information about the Scummvm-git-logs
mailing list