A free Windows-compatible Operating System - mirrored from GitHub
Go to file
Aleksey Bragin 85f0fb63f3 [USETUP]
- Fix a buffer overflow (overread) when adding a locale key to the registry. The history of this bug is funny:
1. Eric wrote the code, which sets a key of REG_SZ type, as 4 widechars plus terminating zero, but passes 8 as the bytesize of the buffer. It's not fully correct (a terminating zero is absent from the bytesize of the buffer, but MSDN doesn't specify if it should be added or not, and hardcoding "8" is not the best idea too) but not dramatic. That was revision 9596, 7 years ago.
2. Lentin notices something is not right in this code, and decides to "fix" it by multiplying that same hardcoded value by.... guess what? sizeof(PWCHAR)! That is, size of a pointer, which on an x86 would be 4 bytes. Massive out of bounds access obviously happens. That was revision 31642, 3 years ago.
3. Very soon Colin reshuffles and improves the code based on patch #2635, however the problem still goes unnoticed (r31655+).
See issue #5810 for more details.

svn path=/trunk/; revision=50968
2011-03-04 18:18:05 +00:00
reactos [USETUP] 2011-03-04 18:18:05 +00:00
rosapps Update Winefile to 1.3.10 too 2010-12-26 16:28:51 +00:00
rostests [USER32_APITEST] 2011-03-03 21:49:44 +00:00
wallpaper Rename the wallpaper to conform with ISO 9660:1988 and make cdmake happy... 2009-02-03 13:26:30 +00:00