mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 15:32:08 +00:00
- More proper fix for the QEMU/Abiword regression. Remove kernel32 hack. Thanks to Filip and The Munger.
svn path=/trunk/; revision=20556
This commit is contained in:
parent
ce5adef908
commit
53ee440af8
2 changed files with 5 additions and 18 deletions
|
@ -72,7 +72,6 @@ InternalAddAtom(BOOLEAN Local,
|
|||
/* Check if we can abuse the TEB */
|
||||
if (AnsiString.MaximumLength > 260)
|
||||
{
|
||||
RosHack:
|
||||
/* We can't, allocate a new string */
|
||||
AtomNameString = &UnicodeString;
|
||||
Status = RtlAnsiStringToUnicodeString(AtomNameString,
|
||||
|
@ -84,14 +83,6 @@ RosHack:
|
|||
/* We can! Get the TEB String */
|
||||
AtomNameString = &NtCurrentTeb()->StaticUnicodeString;
|
||||
|
||||
/* FIXME: HACK! */
|
||||
if (!AtomNameString->MaximumLength)
|
||||
{
|
||||
DPRINT1("Hit the ROS TEB Static Unicode String Bug\n",
|
||||
"Please try to fix the underlying problem!!!\n");
|
||||
goto RosHack;
|
||||
}
|
||||
|
||||
/* Convert it into the TEB */
|
||||
Status = RtlAnsiStringToUnicodeString(AtomNameString,
|
||||
&AnsiString,
|
||||
|
@ -182,7 +173,6 @@ InternalFindAtom(BOOLEAN Local,
|
|||
/* Check if we can abuse the TEB */
|
||||
if (AnsiString.MaximumLength > 260)
|
||||
{
|
||||
RosHack:
|
||||
/* We can't, allocate a new string */
|
||||
AtomNameString = &UnicodeString;
|
||||
Status = RtlAnsiStringToUnicodeString(AtomNameString,
|
||||
|
@ -194,14 +184,6 @@ RosHack:
|
|||
/* We can! Get the TEB String */
|
||||
AtomNameString = &NtCurrentTeb()->StaticUnicodeString;
|
||||
|
||||
/* FIXME: HACK! */
|
||||
if (!AtomNameString->MaximumLength)
|
||||
{
|
||||
DPRINT1("Hit the ROS TEB Static Unicode String Bug\n",
|
||||
"Please try to fix the underlying problem!!!\n");
|
||||
goto RosHack;
|
||||
}
|
||||
|
||||
/* Convert it into the TEB */
|
||||
Status = RtlAnsiStringToUnicodeString(AtomNameString,
|
||||
&AnsiString,
|
||||
|
|
|
@ -377,6 +377,11 @@ LdrpInit(PCONTEXT Context,
|
|||
/* Load execution options */
|
||||
LoadImageFileExecutionOptions(Peb);
|
||||
|
||||
/* Initialize the static teb string */
|
||||
NtCurrentTeb()->StaticUnicodeString.Length = 0;
|
||||
NtCurrentTeb()->StaticUnicodeString.MaximumLength = sizeof(NtCurrentTeb()->StaticUnicodeBuffer);
|
||||
NtCurrentTeb()->StaticUnicodeString.Buffer = NtCurrentTeb()->StaticUnicodeBuffer;
|
||||
|
||||
/* build full ntdll path */
|
||||
wcscpy (FullNtDllPath, SharedUserData->NtSystemRoot);
|
||||
wcscat (FullNtDllPath, L"\\system32\\ntdll.dll");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue