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
cb7db104
Commit
cb7db104
authored
Jul 22, 2003
by
Mike Hearn
Committed by
Alexandre Julliard
Jul 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IMallocSpy cannot cause an allocation failure when cb == 0.
parent
72d8aa5e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
ifs.c
dlls/ole32/ifs.c
+8
-6
No files found.
dlls/ole32/ifs.c
View file @
cb7db104
...
...
@@ -144,16 +144,18 @@ static LPVOID WINAPI IMalloc_fnAlloc(LPMALLOC iface, DWORD cb) {
TRACE
(
"(%ld)
\n
"
,
cb
);
if
(
Malloc32
.
pSpy
)
{
DWORD
preAllocResult
;
EnterCriticalSection
(
&
IMalloc32_SpyCS
);
cb
=
IMallocSpy_PreAlloc
(
Malloc32
.
pSpy
,
cb
);
if
(
0
==
cb
)
{
/* PreAlloc can force Alloc to fail */
LeaveCriticalSection
(
&
IMalloc32_SpyCS
);
preAllocResult
=
IMallocSpy_PreAlloc
(
Malloc32
.
pSpy
,
cb
);
if
((
cb
!=
0
)
&&
(
preAllocResult
==
0
))
{
/* PreAlloc can force Alloc to fail, but not if cb == 0 */
TRACE
(
"returning null
\n
"
);
LeaveCriticalSection
(
&
IMalloc32_SpyCS
);
return
NULL
;
}
}
addr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cb
);
if
(
Malloc32
.
pSpy
)
{
...
...
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