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
cb489f7a
Commit
cb489f7a
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: Check for passing a NULL handle to NtCreateMailslotFile and add a test.
parent
2775db3b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
file.c
dlls/ntdll/file.c
+2
-0
file.c
dlls/ntdll/tests/file.c
+9
-1
No files found.
dlls/ntdll/file.c
View file @
cb489f7a
...
...
@@ -2210,6 +2210,8 @@ NTSTATUS WINAPI NtCreateMailslotFile(PHANDLE pHandle, ULONG DesiredAccess,
pHandle
,
DesiredAccess
,
attr
,
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
TimeOut
);
if
(
!
pHandle
)
return
STATUS_ACCESS_VIOLATION
;
if
(
attr
->
ObjectName
->
Length
<
sizeof
(
leadin
)
||
strncmpiW
(
attr
->
ObjectName
->
Buffer
,
leadin
,
sizeof
(
leadin
)
/
sizeof
(
leadin
[
0
])
))
...
...
dlls/ntdll/tests/file.c
View file @
cb489f7a
...
...
@@ -55,11 +55,19 @@ static void nt_mailslot_test(void)
WCHAR
buffer1
[]
=
{
'\\'
,
'?'
,
'?'
,
'\\'
,
'M'
,
'A'
,
'I'
,
'L'
,
'S'
,
'L'
,
'O'
,
'T'
,
'\\'
,
'R'
,
':'
,
'\\'
,
'F'
,
'R'
,
'E'
,
'D'
,
'\0'
};
TimeOut
.
QuadPart
=
-
1
;
pRtlInitUnicodeString
(
&
str
,
buffer1
);
InitializeObjectAttributes
(
&
attr
,
&
str
,
OBJ_CASE_INSENSITIVE
,
0
,
NULL
);
DesiredAccess
=
CreateOptions
=
MailslotQuota
=
MaxMessageSize
=
0
;
TimeOut
.
QuadPart
=
-
1
;
/*
* Check for NULL pointer handling
*/
rc
=
pNtCreateMailslotFile
(
NULL
,
DesiredAccess
,
&
attr
,
&
IoStatusBlock
,
CreateOptions
,
MailslotQuota
,
MaxMessageSize
,
&
TimeOut
);
ok
(
rc
==
STATUS_ACCESS_VIOLATION
,
"rc = %x not c0000005 STATUS_ACCESS_VIOLATION
\n
"
,
rc
);
/*
* Test a valid call
...
...
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