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
ab91c011
Commit
ab91c011
authored
Mar 16, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: RtlFindActivationContextSectionString should accept a NULL pointer as data.
parent
f091ff58
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
actctx.c
dlls/kernel32/actctx.c
+7
-1
actctx.c
dlls/kernel32/tests/actctx.c
+4
-0
actctx.c
dlls/ntdll/actctx.c
+11
-2
No files found.
dlls/kernel32/actctx.c
View file @
ab91c011
...
@@ -227,7 +227,7 @@ BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID* lpExtGuid,
...
@@ -227,7 +227,7 @@ BOOL WINAPI FindActCtxSectionStringA(DWORD dwFlags, const GUID* lpExtGuid,
TRACE
(
"%08x %s %u %s %p
\n
"
,
dwFlags
,
debugstr_guid
(
lpExtGuid
),
TRACE
(
"%08x %s %u %s %p
\n
"
,
dwFlags
,
debugstr_guid
(
lpExtGuid
),
ulId
,
debugstr_a
(
lpSearchStr
),
pInfo
);
ulId
,
debugstr_a
(
lpSearchStr
),
pInfo
);
if
(
!
lpSearchStr
)
if
(
!
lpSearchStr
||
!
pInfo
)
{
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
return
FALSE
;
...
@@ -255,6 +255,12 @@ BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID* lpExtGuid,
...
@@ -255,6 +255,12 @@ BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID* lpExtGuid,
UNICODE_STRING
us
;
UNICODE_STRING
us
;
NTSTATUS
status
;
NTSTATUS
status
;
if
(
!
pInfo
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
RtlInitUnicodeString
(
&
us
,
lpSearchStr
);
RtlInitUnicodeString
(
&
us
,
lpSearchStr
);
if
((
status
=
RtlFindActivationContextSectionString
(
dwFlags
,
lpExtGuid
,
ulId
,
&
us
,
pInfo
)))
if
((
status
=
RtlFindActivationContextSectionString
(
dwFlags
,
lpExtGuid
,
ulId
,
&
us
,
pInfo
)))
{
{
...
...
dlls/kernel32/tests/actctx.c
View file @
ab91c011
...
@@ -2148,9 +2148,13 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
...
@@ -2148,9 +2148,13 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
"RtlFindActivationContextSectionString: unexpected status 0x%x
\n
"
,
ret
);
"RtlFindActivationContextSectionString: unexpected status 0x%x
\n
"
,
ret
);
ret
=
pRtlFindActivationContextSectionString
(
0
,
NULL
,
section
,
&
string_to_findW
,
NULL
);
ret
=
pRtlFindActivationContextSectionString
(
0
,
NULL
,
section
,
&
string_to_findW
,
NULL
);
if
(
todo
)
todo_wine
todo_wine
ok_
(
__FILE__
,
line
)(
ret
==
(
should_find
?
STATUS_SUCCESS
:
STATUS_SXS_KEY_NOT_FOUND
),
ok_
(
__FILE__
,
line
)(
ret
==
(
should_find
?
STATUS_SUCCESS
:
STATUS_SXS_KEY_NOT_FOUND
),
"RtlFindActivationContextSectionString: unexpected status 0x%x
\n
"
,
ret
);
"RtlFindActivationContextSectionString: unexpected status 0x%x
\n
"
,
ret
);
else
ok_
(
__FILE__
,
line
)(
ret
==
(
should_find
?
STATUS_SUCCESS
:
STATUS_SXS_KEY_NOT_FOUND
),
"RtlFindActivationContextSectionString: unexpected status 0x%x
\n
"
,
ret
);
pRtlFreeUnicodeString
(
&
string_to_findW
);
pRtlFreeUnicodeString
(
&
string_to_findW
);
}
}
...
...
dlls/ntdll/actctx.c
View file @
ab91c011
...
@@ -3133,6 +3133,8 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
...
@@ -3133,6 +3133,8 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
index
=
find_string_index
(
actctx
->
dllredirect_section
,
name
);
index
=
find_string_index
(
actctx
->
dllredirect_section
,
name
);
if
(
!
index
)
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
!
index
)
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
data
)
{
dll
=
get_dllredirect_data
(
actctx
,
index
);
dll
=
get_dllredirect_data
(
actctx
,
index
);
data
->
ulDataFormatVersion
=
1
;
data
->
ulDataFormatVersion
=
1
;
...
@@ -3146,6 +3148,7 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
...
@@ -3146,6 +3148,7 @@ static NTSTATUS find_dll_redirection(ACTIVATION_CONTEXT* actctx, const UNICODE_S
if
(
data
->
cbSize
>=
FIELD_OFFSET
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
+
sizeof
(
ULONG
))
if
(
data
->
cbSize
>=
FIELD_OFFSET
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
+
sizeof
(
ULONG
))
data
->
ulAssemblyRosterIndex
=
index
->
rosterindex
;
data
->
ulAssemblyRosterIndex
=
index
->
rosterindex
;
}
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
...
@@ -3342,6 +3345,8 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
...
@@ -3342,6 +3345,8 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
if
(
!
index
)
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
!
index
)
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
data
)
{
class
=
get_wndclass_data
(
actctx
,
index
);
class
=
get_wndclass_data
(
actctx
,
index
);
data
->
ulDataFormatVersion
=
1
;
data
->
ulDataFormatVersion
=
1
;
...
@@ -3356,6 +3361,7 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
...
@@ -3356,6 +3361,7 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
if
(
data
->
cbSize
>=
FIELD_OFFSET
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
+
sizeof
(
ULONG
))
if
(
data
->
cbSize
>=
FIELD_OFFSET
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
+
sizeof
(
ULONG
))
data
->
ulAssemblyRosterIndex
=
index
->
rosterindex
;
data
->
ulAssemblyRosterIndex
=
index
->
rosterindex
;
}
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
...
@@ -4397,6 +4403,8 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
...
@@ -4397,6 +4403,8 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
index
=
find_string_index
(
actctx
->
progid_section
,
name
);
index
=
find_string_index
(
actctx
->
progid_section
,
name
);
if
(
!
index
)
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
!
index
)
return
STATUS_SXS_KEY_NOT_FOUND
;
if
(
data
)
{
progid
=
get_progid_data
(
actctx
,
index
);
progid
=
get_progid_data
(
actctx
,
index
);
data
->
ulDataFormatVersion
=
1
;
data
->
ulDataFormatVersion
=
1
;
...
@@ -4410,6 +4418,7 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
...
@@ -4410,6 +4418,7 @@ static NTSTATUS find_progid_redirection(ACTIVATION_CONTEXT* actctx, const UNICOD
if
(
data
->
cbSize
>=
FIELD_OFFSET
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
+
sizeof
(
ULONG
))
if
(
data
->
cbSize
>=
FIELD_OFFSET
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
+
sizeof
(
ULONG
))
data
->
ulAssemblyRosterIndex
=
index
->
rosterindex
;
data
->
ulAssemblyRosterIndex
=
index
->
rosterindex
;
}
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
...
@@ -4441,7 +4450,7 @@ static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
...
@@ -4441,7 +4450,7 @@ static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
if
(
status
!=
STATUS_SUCCESS
)
return
status
;
if
(
status
!=
STATUS_SUCCESS
)
return
status
;
if
(
flags
&
FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
)
if
(
data
&&
(
flags
&
FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
)
)
{
{
actctx_addref
(
actctx
);
actctx_addref
(
actctx
);
data
->
hActCtx
=
actctx
;
data
->
hActCtx
=
actctx
;
...
@@ -5008,7 +5017,7 @@ NTSTATUS WINAPI RtlFindActivationContextSectionString( ULONG flags, const GUID *
...
@@ -5008,7 +5017,7 @@ NTSTATUS WINAPI RtlFindActivationContextSectionString( ULONG flags, const GUID *
FIXME
(
"unknown flags %08x
\n
"
,
flags
);
FIXME
(
"unknown flags %08x
\n
"
,
flags
);
return
STATUS_INVALID_PARAMETER
;
return
STATUS_INVALID_PARAMETER
;
}
}
if
(
!
data
||
data
->
cbSize
<
offsetof
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
||
if
(
(
data
&&
data
->
cbSize
<
offsetof
(
ACTCTX_SECTION_KEYED_DATA
,
ulAssemblyRosterIndex
)
)
||
!
section_name
||
!
section_name
->
Buffer
)
!
section_name
||
!
section_name
->
Buffer
)
{
{
WARN
(
"invalid parameter
\n
"
);
WARN
(
"invalid parameter
\n
"
);
...
...
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