scummvm/scummvm — pull request #410 by klusark (2013-10-27 20:20:37+00:00)
Title: Fix a few buffer overflows

backends/platform/sdl/posix/posix.cpp:
The first one is probably not exploitable, but these changes make it more obvious that the correct behavior will occur

gui/ThemeEngine.cpp:
If colorsFound is already larger than MAX_CURS_COLORS _cursorPal[255 * 3 + 2] will have been written to, which is past the end of the 255 * 3 sized buffer.

gui/console.cpp:
If the user enters a command that is more than 256 characters it will overflow the buffer. Therefore make it a Common::String so that it can not overflow.