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
90090332
Commit
90090332
authored
Jan 14, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/safearray: Fix allocation error check for array descriptor.
parent
30063b54
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
safearray.c
dlls/oleaut32/safearray.c
+7
-3
No files found.
dlls/oleaut32/safearray.c
View file @
90090332
...
@@ -172,11 +172,15 @@ static ULONG SAFEARRAY_GetCellCount(const SAFEARRAY *psa)
...
@@ -172,11 +172,15 @@ static ULONG SAFEARRAY_GetCellCount(const SAFEARRAY *psa)
/* Allocate a descriptor for an array */
/* Allocate a descriptor for an array */
static
HRESULT
SAFEARRAY_AllocDescriptor
(
ULONG
ulSize
,
SAFEARRAY
**
ppsaOut
)
static
HRESULT
SAFEARRAY_AllocDescriptor
(
ULONG
ulSize
,
SAFEARRAY
**
ppsaOut
)
{
{
*
ppsaOut
=
(
SAFEARRAY
*
)((
char
*
)
SAFEARRAY_Malloc
(
ulSize
+
SAFEARRAY_HIDDEN_SIZE
)
+
SAFEARRAY_HIDDEN_SIZE
);
char
*
ptr
=
SAFEARRAY_Malloc
(
ulSize
+
SAFEARRAY_HIDDEN_SIZE
);
if
(
!*
ppsaOut
)
if
(
!
ptr
)
return
E_UNEXPECTED
;
{
*
ppsaOut
=
NULL
;
return
E_UNEXPECTED
;
}
*
ppsaOut
=
(
SAFEARRAY
*
)(
ptr
+
SAFEARRAY_HIDDEN_SIZE
);
return
S_OK
;
return
S_OK
;
}
}
...
...
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