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
af557f0c
Commit
af557f0c
authored
Dec 31, 2022
by
Jinoh Kang
Committed by
Alexandre Julliard
Jan 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Validate blocks in the heap pending free request list.
parent
8cc5e892
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
heap.c
dlls/ntdll/heap.c
+30
-0
No files found.
dlls/ntdll/heap.c
View file @
af557f0c
...
@@ -1174,6 +1174,36 @@ static BOOL heap_validate( const struct heap *heap )
...
@@ -1174,6 +1174,36 @@ static BOOL heap_validate( const struct heap *heap )
}
}
}
}
if
(
heap
->
pending_free
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
MAX_FREE_PENDING
;
i
++
)
{
if
(
!
(
block
=
heap
->
pending_free
[
i
]))
break
;
subheap
=
find_subheap
(
heap
,
block
,
FALSE
);
if
(
!
subheap
)
{
ERR
(
"heap %p: cannot find valid subheap for delayed freed block %p
\n
"
,
heap
,
block
);
if
(
TRACE_ON
(
heap
))
heap_dump
(
heap
);
return
FALSE
;
}
if
(
!
validate_used_block
(
heap
,
subheap
,
block
,
BLOCK_TYPE_DEAD
))
return
FALSE
;
}
for
(;
i
<
MAX_FREE_PENDING
;
i
++
)
{
if
((
block
=
heap
->
pending_free
[
i
]))
{
ERR
(
"heap %p: unexpected delayed freed block %p at slot %u
\n
"
,
heap
,
block
,
i
);
if
(
TRACE_ON
(
heap
))
heap_dump
(
heap
);
return
FALSE
;
}
}
}
LIST_FOR_EACH_ENTRY
(
large_arena
,
&
heap
->
large_list
,
ARENA_LARGE
,
entry
)
LIST_FOR_EACH_ENTRY
(
large_arena
,
&
heap
->
large_list
,
ARENA_LARGE
,
entry
)
if
(
!
validate_large_block
(
heap
,
&
large_arena
->
block
))
return
FALSE
;
if
(
!
validate_large_block
(
heap
,
&
large_arena
->
block
))
return
FALSE
;
...
...
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