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
bd745957
Commit
bd745957
authored
Apr 12, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Apr 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Check that lpSectionBase != NULL before dereferencing.
If lpSectionBase is null then the tests will still crash, but at least we'll know why.
parent
2371906a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
actctx.c
dlls/kernel32/tests/actctx.c
+3
-3
No files found.
dlls/kernel32/tests/actctx.c
View file @
bd745957
...
...
@@ -1454,8 +1454,8 @@ static void test_find_activatable_class(HANDLE handle, const WCHAR *classid, enu
ok_
(
__FILE__
,
line
)(
data
.
lpData
!=
NULL
,
"got lpData %p
\n
"
,
data
.
lpData
);
header
=
(
struct
strsection_header
*
)
data
.
lpSectionBase
;
ok_
(
__FILE__
,
line
)(
header
->
magic
==
0x64487353
,
"got wrong magic 0x%08lx
\n
"
,
header
->
magic
);
ok_
(
__FILE__
,
line
)(
data
.
lpSectionBase
!=
NULL
,
"got lpSectionBase %p
\n
"
,
data
.
lpSectionBase
);
ok_
(
__FILE__
,
line
)(
header
->
magic
==
0x64487353
,
"got wrong magic 0x%08lx
\n
"
,
header
->
magic
);
ok_
(
__FILE__
,
line
)(
data
.
ulSectionTotalLength
>
0
,
"got ulSectionTotalLength %lu
\n
"
,
data
.
ulSectionTotalLength
);
ok_
(
__FILE__
,
line
)(
data
.
lpSectionGlobalData
==
(
BYTE
*
)
header
+
header
->
global_offset
,
"got lpSectionGlobalData %p
\n
"
,
data
.
lpSectionGlobalData
);
...
...
@@ -1706,10 +1706,10 @@ static void test_find_com_redirection(HANDLE handle, const GUID *clsid, const GU
}
header
=
(
struct
guidsection_header
*
)
data
.
lpSectionBase
;
ok_
(
__FILE__
,
line
)(
data
.
lpSectionBase
!=
NULL
,
"data.lpSectionBase == NULL
\n
"
);
ok_
(
__FILE__
,
line
)(
data
.
lpSectionGlobalData
==
((
BYTE
*
)
header
+
header
->
names_offset
),
"data.lpSectionGlobalData == NULL
\n
"
);
ok_
(
__FILE__
,
line
)(
data
.
ulSectionGlobalDataLength
==
header
->
names_len
,
"data.ulSectionGlobalDataLength=%lu
\n
"
,
data
.
ulSectionGlobalDataLength
);
ok_
(
__FILE__
,
line
)(
data
.
lpSectionBase
!=
NULL
,
"data.lpSectionBase == NULL
\n
"
);
ok_
(
__FILE__
,
line
)(
data
.
ulSectionTotalLength
>
0
,
"data.ulSectionTotalLength=%lu
\n
"
,
data
.
ulSectionTotalLength
);
ok_
(
__FILE__
,
line
)(
data
.
hActCtx
==
NULL
,
"data.hActCtx=%p
\n
"
,
data
.
hActCtx
);
...
...
@@ -1914,9 +1914,9 @@ static void test_find_progid_redirection(HANDLE handle, const GUID *clsid, const
}
header
=
(
struct
strsection_header
*
)
data
.
lpSectionBase
;
ok_
(
__FILE__
,
line
)(
data
.
lpSectionBase
!=
NULL
,
"data.lpSectionBase == NULL
\n
"
);
ok_
(
__FILE__
,
line
)(
data
.
lpSectionGlobalData
==
(
BYTE
*
)
header
+
header
->
global_offset
,
"data.lpSectionGlobalData == NULL
\n
"
);
ok_
(
__FILE__
,
line
)(
data
.
ulSectionGlobalDataLength
==
header
->
global_len
,
"data.ulSectionGlobalDataLength=%lu
\n
"
,
data
.
ulSectionGlobalDataLength
);
ok_
(
__FILE__
,
line
)(
data
.
lpSectionBase
!=
NULL
,
"data.lpSectionBase == NULL
\n
"
);
ok_
(
__FILE__
,
line
)(
data
.
ulSectionTotalLength
>
0
,
"data.ulSectionTotalLength=%lu
\n
"
,
data
.
ulSectionTotalLength
);
ok_
(
__FILE__
,
line
)(
data
.
hActCtx
==
NULL
,
"data.hActCtx=%p
\n
"
,
data
.
hActCtx
);
ok_
(
__FILE__
,
line
)(
data
.
ulAssemblyRosterIndex
==
exid
,
"data.ulAssemblyRosterIndex=%lu, expected %lu
\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