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
82c45159
Commit
82c45159
authored
Nov 20, 2022
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 21, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oledb32: Handle memory allocation failure in rowpos_cp_Advise.
parent
9d7e045c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
rowpos.c
dlls/oledb32/rowpos.c
+8
-2
No files found.
dlls/oledb32/rowpos.c
View file @
82c45159
...
@@ -380,6 +380,7 @@ static HRESULT WINAPI rowpos_cp_Advise(IConnectionPoint *iface, IUnknown *unksin
...
@@ -380,6 +380,7 @@ static HRESULT WINAPI rowpos_cp_Advise(IConnectionPoint *iface, IUnknown *unksin
{
{
rowpos_cp
*
This
=
impl_from_IConnectionPoint
(
iface
);
rowpos_cp
*
This
=
impl_from_IConnectionPoint
(
iface
);
IRowPositionChange
*
sink
;
IRowPositionChange
*
sink
;
IRowPositionChange
**
new_sinks
;
HRESULT
hr
;
HRESULT
hr
;
DWORD
i
;
DWORD
i
;
...
@@ -404,14 +405,19 @@ static HRESULT WINAPI rowpos_cp_Advise(IConnectionPoint *iface, IUnknown *unksin
...
@@ -404,14 +405,19 @@ static HRESULT WINAPI rowpos_cp_Advise(IConnectionPoint *iface, IUnknown *unksin
if
(
i
==
This
->
sinks_size
)
if
(
i
==
This
->
sinks_size
)
{
{
new_sinks
=
heap_realloc_zero
(
This
->
sinks
,
2
*
This
->
sinks_size
*
sizeof
(
*
This
->
sinks
));
if
(
!
new_sinks
)
return
E_OUTOFMEMORY
;
This
->
sinks
=
new_sinks
;
This
->
sinks_size
*=
2
;
This
->
sinks_size
*=
2
;
This
->
sinks
=
heap_realloc_zero
(
This
->
sinks
,
This
->
sinks_size
*
sizeof
(
*
This
->
sinks
));
}
}
}
}
else
else
{
{
This
->
sinks
=
heap_alloc_zero
(
10
*
sizeof
(
*
This
->
sinks
));
if
(
!
This
->
sinks
)
return
E_OUTOFMEMORY
;
This
->
sinks_size
=
10
;
This
->
sinks_size
=
10
;
This
->
sinks
=
heap_alloc_zero
(
This
->
sinks_size
*
sizeof
(
*
This
->
sinks
));
i
=
0
;
i
=
0
;
}
}
...
...
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