mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
[rtl]
- Fix an out-of-bounds read in RtlpDidUnicodeToOemWorked. See issue #4888 for more details. svn path=/trunk/; revision=43438
This commit is contained in:
@@ -417,12 +417,12 @@ RtlpDidUnicodeToOemWork(IN PCUNICODE_STRING UnicodeString,
|
||||
ULONG i = 0;
|
||||
|
||||
/* Go through all characters of a string */
|
||||
while ((OemString->Buffer[i] != 0) &&
|
||||
(i < OemString->Length))
|
||||
while (i < OemString->Length)
|
||||
{
|
||||
/* Check if it got translated into '?', but source char
|
||||
wasn't '?' equivalent */
|
||||
if ((OemString->Buffer[i] == NlsOemDefaultChar) &&
|
||||
if ((OemString->Buffer[i] != 0) &&
|
||||
(OemString->Buffer[i] == NlsOemDefaultChar) &&
|
||||
(UnicodeString->Buffer[i] != NlsUnicodeDefaultChar))
|
||||
{
|
||||
/* Yes, it means unmappable characters were found */
|
||||
|
||||
Reference in New Issue
Block a user