Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
afd4aed5
Commit
afd4aed5
authored
Dec 15, 2009
by
Marcus Meissner
Committed by
Alexandre Julliard
Dec 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Check for NULL attr in NtOpenKey (Coverity).
parent
6feb525b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
reg.c
dlls/ntdll/reg.c
+3
-1
reg.c
dlls/ntdll/tests/reg.c
+0
-4
No files found.
dlls/ntdll/reg.c
View file @
afd4aed5
...
...
@@ -114,8 +114,10 @@ NTSTATUS WINAPI RtlpNtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJEC
NTSTATUS
WINAPI
NtOpenKey
(
PHANDLE
retkey
,
ACCESS_MASK
access
,
const
OBJECT_ATTRIBUTES
*
attr
)
{
NTSTATUS
ret
;
DWORD
len
=
attr
->
ObjectName
->
Length
;
DWORD
len
;
if
(
!
attr
)
return
STATUS_ACCESS_VIOLATION
;
len
=
attr
->
ObjectName
->
Length
;
TRACE
(
"(%p,%s,%x,%p)
\n
"
,
attr
->
RootDirectory
,
debugstr_us
(
attr
->
ObjectName
),
access
,
retkey
);
...
...
dlls/ntdll/tests/reg.c
View file @
afd4aed5
...
...
@@ -336,9 +336,6 @@ static void test_NtOpenKey(void)
OBJECT_ATTRIBUTES
attr
;
ACCESS_MASK
am
=
KEY_READ
;
if
(
0
)
{
/* Crashes Wine */
/* All NULL */
status
=
pNtOpenKey
(
NULL
,
0
,
NULL
);
ok
(
status
==
STATUS_ACCESS_VIOLATION
,
"Expected STATUS_ACCESS_VIOLATION, got: 0x%08x
\n
"
,
status
);
...
...
@@ -347,7 +344,6 @@ static void test_NtOpenKey(void)
status
=
pNtOpenKey
(
&
key
,
0
,
NULL
);
ok
(
status
==
STATUS_ACCESS_VIOLATION
/* W2K3/XP/W2K */
||
status
==
STATUS_INVALID_PARAMETER
/* NT4 */
,
"Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_PARAMETER(NT4), got: 0x%08x
\n
"
,
status
);
}
InitializeObjectAttributes
(
&
attr
,
&
winetestpath
,
0
,
0
,
0
);
...
...
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