mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 13:53:41 +00:00
[RTL]
- Acquire the PEB lock before reading Peb->ProcessParameters->Environment in RtlQueryEnvironmentVariable_U. Patch by Mark Jansen. CORE-10381 svn path=/trunk/; revision=69939
This commit is contained in:
parent
bd198a5fd5
commit
84db6add79
1 changed files with 3 additions and 2 deletions
|
@ -524,6 +524,7 @@ RtlQueryEnvironmentVariable_U(PWSTR Environment,
|
|||
{
|
||||
PPEB Peb = RtlGetCurrentPeb();
|
||||
if (Peb) {
|
||||
RtlAcquirePebLock();
|
||||
Environment = Peb->ProcessParameters->Environment;
|
||||
SysEnvUsed = TRUE;
|
||||
}
|
||||
|
@ -531,12 +532,12 @@ RtlQueryEnvironmentVariable_U(PWSTR Environment,
|
|||
|
||||
if (Environment == NULL)
|
||||
{
|
||||
if (SysEnvUsed)
|
||||
RtlReleasePebLock();
|
||||
return(STATUS_VARIABLE_NOT_FOUND);
|
||||
}
|
||||
|
||||
Value->Length = 0;
|
||||
if (SysEnvUsed)
|
||||
RtlAcquirePebLock();
|
||||
|
||||
wcs = Environment;
|
||||
DPRINT("Starting search at :%p\n", wcs);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue