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
76696cd9
Commit
76696cd9
authored
Nov 24, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Handle memory allocation failure in ConnectionPoint_Advise.
parent
db691cd9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
conpoint.c
dlls/mshtml/conpoint.c
+10
-8
No files found.
dlls/mshtml/conpoint.c
View file @
76696cd9
...
...
@@ -216,6 +216,7 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
{
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
IUnknown
*
sink
;
void
*
new_sinks
;
DWORD
i
;
HRESULT
hres
;
...
...
@@ -227,18 +228,19 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
if
(
FAILED
(
hres
))
return
CONNECT_E_CANNOTCONNECT
;
if
(
This
->
sinks
)
{
for
(
i
=
0
;
i
<
This
->
sinks_size
;
i
++
)
{
for
(
i
=
0
;
i
<
This
->
sinks_size
;
i
++
)
{
if
(
!
This
->
sinks
[
i
].
unk
)
break
;
}
if
(
i
==
This
->
sinks_size
)
This
->
sinks
=
realloc
(
This
->
sinks
,
(
++
This
->
sinks_size
)
*
sizeof
(
*
This
->
sinks
));
}
else
{
This
->
sinks
=
malloc
(
sizeof
(
*
This
->
sinks
));
This
->
sinks_size
=
1
;
i
=
0
;
if
(
i
==
This
->
sinks_size
)
{
new_sinks
=
realloc
(
This
->
sinks
,
(
This
->
sinks_size
+
1
)
*
sizeof
(
*
This
->
sinks
));
if
(
!
new_sinks
)
{
IUnknown_Release
(
sink
);
return
E_OUTOFMEMORY
;
}
This
->
sinks
=
new_sinks
;
This
->
sinks_size
++
;
}
This
->
sinks
[
i
].
unk
=
sink
;
...
...
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