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
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
conpoint.c
dlls/mshtml/conpoint.c
+13
-11
No files found.
dlls/mshtml/conpoint.c
View file @
76696cd9
...
@@ -216,6 +216,7 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
...
@@ -216,6 +216,7 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
{
{
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
ConnectionPoint
*
This
=
impl_from_IConnectionPoint
(
iface
);
IUnknown
*
sink
;
IUnknown
*
sink
;
void
*
new_sinks
;
DWORD
i
;
DWORD
i
;
HRESULT
hres
;
HRESULT
hres
;
...
@@ -227,18 +228,19 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
...
@@ -227,18 +228,19 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
CONNECT_E_CANNOTCONNECT
;
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
)
if
(
!
This
->
sinks
[
i
].
unk
)
break
;
break
;
}
}
if
(
i
==
This
->
sinks_size
)
if
(
i
==
This
->
sinks_size
)
{
This
->
sinks
=
realloc
(
This
->
sinks
,
(
++
This
->
sinks_size
)
*
sizeof
(
*
This
->
sinks
));
new_sinks
=
realloc
(
This
->
sinks
,
(
This
->
sinks_size
+
1
)
*
sizeof
(
*
This
->
sinks
));
}
else
{
if
(
!
new_sinks
)
{
This
->
sinks
=
malloc
(
sizeof
(
*
This
->
sinks
));
IUnknown_Release
(
sink
);
This
->
sinks_size
=
1
;
return
E_OUTOFMEMORY
;
i
=
0
;
}
This
->
sinks
=
new_sinks
;
This
->
sinks_size
++
;
}
}
This
->
sinks
[
i
].
unk
=
sink
;
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