Ticket #8975: scummvm-0.13-bufferoverflow.patch
File scummvm-0.13-bufferoverflow.patch, 740 bytes (added by , 15 years ago) |
---|
-
engines/saga/sfuncs.cpp
1570 1570 1571 1571 for (int i = 0; i < nArgs; i++) { 1572 1572 snprintf(buf1, 100, "%d", thread->pop()); 1573 strncat(buf, buf1, 256);1573 strncat(buf, buf1, sizeof(buf) - strlen(buf) - 1); 1574 1574 if (i + 1 < nArgs) 1575 strncat(buf, ", ", 256);1575 strncat(buf, ", ", sizeof(buf) - strlen(buf) - 1); 1576 1576 } 1577 1577 1578 1578 debug(0, "%s)", buf); -
engines/scumm/he/logic_he.cpp
86 86 87 87 for (int i = 1; i < numArgs; i++) { 88 88 snprintf(tmp, 32, ", %d", args[i]); 89 strncat(str, tmp, 256);89 strncat(str, tmp, sizeof(str) - strlen(str) - 1); 90 90 } 91 strncat(str, "])", 256);91 strncat(str, "])", sizeof(str) - strlen(str) - 1); 92 92 93 93 debug(0, "%s", str); 94 94 #else