Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6fdfd53e
Commit
6fdfd53e
authored
Feb 25, 2000
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 25, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not overwrite the valid ObjectAttributes->RootDirectory.
Perform case insensitive comparison for the registry paths.
parent
1da43e3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
reg.c
dlls/ntdll/reg.c
+13
-8
No files found.
dlls/ntdll/reg.c
View file @
6fdfd53e
...
@@ -57,31 +57,36 @@ static BOOLEAN _NtKeyToWinKey(
...
@@ -57,31 +57,36 @@ static BOOLEAN _NtKeyToWinKey(
'\\'
,
'C'
,
'L'
,
'A'
,
'S'
,
'S'
,
'E'
,
'S'
,
0
};
'\\'
,
'C'
,
'L'
,
'A'
,
'S'
,
'S'
,
'E'
,
'S'
,
0
};
int
len
;
int
len
;
PUNICODE_STRING
ObjectName
=
ObjectAttributes
->
ObjectName
;
PUNICODE_STRING
ObjectName
=
ObjectAttributes
->
ObjectName
;
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HKLM
)))
if
(
ObjectAttributes
->
RootDirectory
)
&&
(
0
==
CRTDLL_wcsncmp
(
ObjectName
->
Buffer
,
KeyPath_HKLM
,
len
)))
{
len
=
0
;
*
KeyHandle
=
ObjectAttributes
->
RootDirectory
;
}
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HKLM
)))
&&
(
0
==
CRTDLL__wcsnicmp
(
ObjectName
->
Buffer
,
KeyPath_HKLM
,
len
)))
{
*
KeyHandle
=
HKEY_LOCAL_MACHINE
;
{
*
KeyHandle
=
HKEY_LOCAL_MACHINE
;
}
}
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HKU
)))
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HKU
)))
&&
(
0
==
CRTDLL_
wcsn
cmp
(
ObjectName
->
Buffer
,
KeyPath_HKU
,
len
)))
&&
(
0
==
CRTDLL_
_wcsni
cmp
(
ObjectName
->
Buffer
,
KeyPath_HKU
,
len
)))
{
*
KeyHandle
=
HKEY_USERS
;
{
*
KeyHandle
=
HKEY_USERS
;
}
}
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HCR
)))
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HCR
)))
&&
(
0
==
CRTDLL_
wcsn
cmp
(
ObjectName
->
Buffer
,
KeyPath_HCR
,
len
)))
&&
(
0
==
CRTDLL_
_wcsni
cmp
(
ObjectName
->
Buffer
,
KeyPath_HCR
,
len
)))
{
*
KeyHandle
=
HKEY_CLASSES_ROOT
;
{
*
KeyHandle
=
HKEY_CLASSES_ROOT
;
}
}
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HCC
)))
else
if
((
ObjectName
->
Length
>
(
len
=
lstrlenW
(
KeyPath_HCC
)))
&&
(
0
==
CRTDLL_
wcsn
cmp
(
ObjectName
->
Buffer
,
KeyPath_HCC
,
len
)))
&&
(
0
==
CRTDLL_
_wcsni
cmp
(
ObjectName
->
Buffer
,
KeyPath_HCC
,
len
)))
{
*
KeyHandle
=
HKEY_CURRENT_CONFIG
;
{
*
KeyHandle
=
HKEY_CURRENT_CONFIG
;
}
}
else
else
{
{
*
KeyHandle
=
ObjectAttributes
->
RootDirectory
;
*
KeyHandle
=
0
;
*
Offset
=
0
;
*
Offset
=
0
;
return
FALSE
;
return
FALSE
;
}
}
if
(
ObjectName
->
Buffer
[
len
]
==
(
WCHAR
)
'\\'
)
len
++
;
if
(
len
>
0
&&
ObjectName
->
Buffer
[
len
]
==
(
WCHAR
)
'\\'
)
len
++
;
*
Offset
=
len
;
*
Offset
=
len
;
TRACE
(
"off=%u hkey=0x%08x
\n
"
,
*
Offset
,
*
KeyHandle
);
TRACE
(
"off=%u hkey=0x%08x
\n
"
,
*
Offset
,
*
KeyHandle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment