Commit graph

8 commits

Author SHA1 Message Date
marauder2k7 2b295fb7f0 rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
2024-03-18 18:40:22 +00:00
Lukas Joergensen e718841467 Eliminate DefineConsoleFunction 2018-04-17 20:54:08 +02:00
Daniel Buckmaster 486a12cb96 Merge pull request #1183 from MusicMonkey5555/documentation
Documentation
2015-02-14 19:52:37 +11:00
Nathan Bowhay 27fa97f44d shellExecute return documentation
Added documentation to shellExecute about bool that is returned.
2015-02-11 09:52:59 -08:00
Ben Payne a88339c219 Fix buffer overflows due to incorrect use of sizeof
A snippet of example code:

UTF16 pszFilter[1024];
...
convertUTF8toUTF16((UTF8 *)mData.mFilters, pszFilter, sizeof(pszFilter));

Since the conversion function is expecting the third parameter to be the
length in 16-bit characters, *not* bytes, this results in the function
writing outside the bounds of the output array.

To make this less likely to happen in the future (I hope), I've provided a
template function that infers the correct size of a static array, so it's
no longer necessary to pass the size in most cases. The sized function has
been renamed with an "N" suffix to hopefully encourage this use.

This bug was caught due to a warning from MSVC about stack corruption
occurring in codeBlock::exec(), after opening a file open dialog twice in
succession. After some hunting, I found that this was due to
FileDialog::Execute() passing incorrect buffer sizes to the conversion
function, which resulted in the function writing a null terminator into
some memory that happened to be in the stack frame of codeBlock::exec()!
2015-01-26 16:52:01 -05:00
LuisAntonRebollo 475f218bcd Modified files for SDL2. 2015-01-18 22:52:29 +01:00
Vincent Gee acb192e2a5 Replaced a ton of ConsoleMethods with the DefineConsoleMethod Macro. 2014-11-03 22:42:51 -05:00
DavidWyand-GG 7dbfe6994d Engine directory for ticket #1 2012-09-19 11:15:01 -04:00