This commit is contained in:
parent
c7efbfed6b
commit
a3eadec1aa
22
scummvm-bufferoverflow.diff
Normal file
22
scummvm-bufferoverflow.diff
Normal file
@ -0,0 +1,22 @@
|
||||
--- engines/saga/sfuncs.cpp.orig 2008-01-13 17:43:26.266273000 +0100
|
||||
+++ engines/saga/sfuncs.cpp 2008-01-13 17:47:20.736926500 +0100
|
||||
@@ -1985,7 +1985,7 @@
|
||||
|
||||
for (int i = 0; i < nArgs; i++) {
|
||||
snprintf(buf1, 100, "%d", thread->pop());
|
||||
- strncat(buf, buf1, 256);
|
||||
+ strncat(buf, buf1, sizeof(buf) - strlen(buf) - 1);
|
||||
if (i + 1 < nArgs)
|
||||
strncat(buf, ", ", 256);
|
||||
}
|
||||
--- engines/scumm/he/logic_he.cpp.orig 2008-01-13 17:48:28.561165250 +0100
|
||||
+++ engines/scumm/he/logic_he.cpp 2008-01-13 17:48:45.454221000 +0100
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
for (int i = 1; i < numArgs; i++) {
|
||||
snprintf(tmp, 32, ", %d", args[i]);
|
||||
- strncat(str, tmp, 256);
|
||||
+ strncat(str, tmp, sizeof(str) - strlen(str) - 1);
|
||||
}
|
||||
strncat(str, "])", 256);
|
||||
|
Loading…
Reference in New Issue
Block a user