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
d992e2d0
Commit
d992e2d0
authored
May 29, 2023
by
Jinoh Kang
Committed by
Alexandre Julliard
May 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Move ACTCTX lpResourceName validation to RtlCreateActivationContext.
This prevents passing NULL resource name to get_manifest_in_module().
parent
b9507d0e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
actctx.c
dlls/kernel32/tests/actctx.c
+0
-2
actctx.c
dlls/ntdll/actctx.c
+3
-2
No files found.
dlls/kernel32/tests/actctx.c
View file @
d992e2d0
...
...
@@ -3804,7 +3804,6 @@ static void test_manifest_resource_name_omitted(void)
handle
=
CreateActCtxW
(
&
ctx
);
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"CreateActCtxW shall fail
\n
"
);
todo_wine
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %lu
\n
"
,
err
);
len
=
GetModuleFileNameW
(
NULL
,
pathbuf
,
ARRAY_SIZE
(
pathbuf
));
...
...
@@ -3828,7 +3827,6 @@ static void test_manifest_resource_name_omitted(void)
handle
=
CreateActCtxW
(
&
ctx
);
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"CreateActCtxW shall fail
\n
"
);
todo_wine
ok
(
err
==
ERROR_INVALID_PARAMETER
,
"got %lu
\n
"
,
err
);
}
...
...
dlls/ntdll/actctx.c
View file @
d992e2d0
...
...
@@ -2951,8 +2951,6 @@ static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assemb
hModule
,
debugstr_w
(
filename
)
);
}
if
(
!
resname
)
return
STATUS_INVALID_PARAMETER
;
info
.
Type
=
RT_MANIFEST
;
info
.
Language
=
lang
;
if
(
!
((
ULONG_PTR
)
resname
>>
16
))
...
...
@@ -5232,6 +5230,9 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr )
(
pActCtx
->
dwFlags
&
~
ACTCTX_FLAGS_ALL
))
return
STATUS_INVALID_PARAMETER
;
if
((
pActCtx
->
dwFlags
&
ACTCTX_FLAG_RESOURCE_NAME_VALID
)
&&
!
pActCtx
->
lpResourceName
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
(
actctx
=
RtlAllocateHeap
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
actctx
)
)))
return
STATUS_NO_MEMORY
;
...
...
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