Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7f4e5b1e
Commit
7f4e5b1e
authored
Jan 24, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't crash on empty table in RtlAddFunctionTable().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9b0e1f0b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+1
-1
exception.c
dlls/ntdll/tests/exception.c
+8
-0
No files found.
dlls/ntdll/signal_x86_64.c
View file @
7f4e5b1e
...
...
@@ -3458,7 +3458,7 @@ BOOLEAN CDECL RtlAddFunctionTable( RUNTIME_FUNCTION *table, DWORD count, DWORD64
return
FALSE
;
entry
->
base
=
addr
;
entry
->
end
=
addr
+
table
[
count
-
1
].
EndAddress
;
entry
->
end
=
addr
+
(
count
?
table
[
count
-
1
].
EndAddress
:
0
)
;
entry
->
table
=
table
;
entry
->
count
=
count
;
entry
->
max_count
=
0
;
...
...
dlls/ntdll/tests/exception.c
View file @
7f4e5b1e
...
...
@@ -2103,6 +2103,14 @@ static void test_dynamic_unwind(void)
ok
(
!
pRtlDeleteFunctionTable
(
runtime_func
),
"RtlDeleteFunctionTable returned success for nonexistent table runtime_func = %p
\n
"
,
runtime_func
);
/* Empty table */
ok
(
pRtlAddFunctionTable
(
runtime_func
,
0
,
(
ULONG_PTR
)
code_mem
),
"RtlAddFunctionTable failed for empty table
\n
"
);
ok
(
pRtlDeleteFunctionTable
(
runtime_func
),
"RtlDeleteFunctionTable failed for empty table
\n
"
);
ok
(
!
pRtlDeleteFunctionTable
(
runtime_func
),
"RtlDeleteFunctionTable succeeded twice for empty table
\n
"
);
/* Test RtlInstallFunctionTableCallback with both low bits unset */
table
=
(
ULONG_PTR
)
code_mem
;
ok
(
!
pRtlInstallFunctionTableCallback
(
table
,
(
ULONG_PTR
)
code_mem
,
code_offset
+
32
,
&
dynamic_unwind_callback
,
(
PVOID
*
)
&
count
,
NULL
),
...
...
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