mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 08:25:53 +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:
parent
89bda0c12e
commit
352dfbf644
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue