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
8b2a86a8
Commit
8b2a86a8
authored
Feb 27, 2007
by
Jeff Latimer
Committed by
Alexandre Julliard
Feb 28, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Test object attributes in NtCreateMailslotFile.
parent
74db5a19
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
file.c
dlls/ntdll/file.c
+4
-0
file.c
dlls/ntdll/tests/file.c
+32
-0
No files found.
dlls/ntdll/file.c
View file @
8b2a86a8
...
...
@@ -2213,6 +2213,10 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
if
(
!
pHandle
)
return
STATUS_ACCESS_VIOLATION
;
if
(
!
attr
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
attr
->
ObjectName
)
return
STATUS_OBJECT_PATH_SYNTAX_BAD
;
if
(
attr
->
ObjectName
->
Length
<
sizeof
(
leadin
)
||
strncmpiW
(
attr
->
ObjectName
->
Buffer
,
leadin
,
sizeof
(
leadin
)
/
sizeof
(
leadin
[
0
])
))
...
...
dlls/ntdll/tests/file.c
View file @
8b2a86a8
...
...
@@ -81,8 +81,40 @@ static void nt_mailslot_test(void)
if
(
rc
==
STATUS_SUCCESS
)
rc
=
pNtClose
(
hslot
);
/*
* Test that the length field is checked properly
*/
attr
.
Length
=
0
;
rc
=
pNtCreateMailslotFile
(
&
hslot
,
DesiredAccess
,
&
attr
,
&
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
&
TimeOut
);
todo_wine
ok
(
rc
==
STATUS_INVALID_PARAMETER
,
"rc = %x not c000000d STATUS_INVALID_PARAMETER
\n
"
,
rc
);
if
(
rc
==
STATUS_SUCCESS
)
pNtClose
(
hslot
);
attr
.
Length
=
sizeof
(
OBJECT_ATTRIBUTES
)
+
1
;
rc
=
pNtCreateMailslotFile
(
&
hslot
,
DesiredAccess
,
&
attr
,
&
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
&
TimeOut
);
todo_wine
ok
(
rc
==
STATUS_INVALID_PARAMETER
,
"rc = %x not c000000d STATUS_INVALID_PARAMETER
\n
"
,
rc
);
if
(
rc
==
STATUS_SUCCESS
)
pNtClose
(
hslot
);
/*
* Test handling of a NULL unicode string in ObjectName
*/
InitializeObjectAttributes
(
&
attr
,
&
str
,
OBJ_CASE_INSENSITIVE
,
0
,
NULL
);
attr
.
ObjectName
=
NULL
;
rc
=
pNtCreateMailslotFile
(
&
hslot
,
DesiredAccess
,
&
attr
,
&
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
&
TimeOut
);
ok
(
rc
==
STATUS_OBJECT_PATH_SYNTAX_BAD
,
"rc = %x not c000003b STATUS_OBJECT_PATH_SYNTAX_BAD
\n
"
,
rc
);
if
(
rc
==
STATUS_SUCCESS
)
pNtClose
(
hslot
);
/*
* Test a valid call
*/
InitializeObjectAttributes
(
&
attr
,
&
str
,
OBJ_CASE_INSENSITIVE
,
0
,
NULL
);
rc
=
pNtCreateMailslotFile
(
&
hslot
,
DesiredAccess
,
&
attr
,
&
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
&
TimeOut
);
...
...
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