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
ec35d3ab
Commit
ec35d3ab
authored
Oct 06, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 07, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added a few missing allocation checks (Coverity).
parent
43c7907f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
array.c
dlls/jscript/array.c
+5
-1
jscript.c
dlls/jscript/jscript.c
+2
-0
number.c
dlls/jscript/number.c
+5
-1
No files found.
dlls/jscript/array.c
View file @
ec35d3ab
...
...
@@ -744,9 +744,13 @@ static HRESULT ArrayConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DISP
static
HRESULT
alloc_array
(
script_ctx_t
*
ctx
,
BOOL
use_constr
,
ArrayInstance
**
ret
)
{
ArrayInstance
*
array
=
heap_alloc_zero
(
sizeof
(
ArrayInstance
))
;
ArrayInstance
*
array
;
HRESULT
hres
;
array
=
heap_alloc_zero
(
sizeof
(
ArrayInstance
));
if
(
!
array
)
return
E_OUTOFMEMORY
;
if
(
use_constr
)
hres
=
init_dispex_from_constr
(
&
array
->
dispex
,
ctx
,
&
Array_info
,
ctx
->
array_constr
);
else
...
...
dlls/jscript/jscript.c
View file @
ec35d3ab
...
...
@@ -758,6 +758,8 @@ HRESULT WINAPI JScriptFactory_CreateInstance(IClassFactory *iface, IUnknown *pUn
lock_module
();
ret
=
heap_alloc_zero
(
sizeof
(
*
ret
));
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpIActiveScriptVtbl
=
&
JScriptVtbl
;
ret
->
lpIActiveScriptParseVtbl
=
&
JScriptParseVtbl
;
...
...
dlls/jscript/number.c
View file @
ec35d3ab
...
...
@@ -231,9 +231,13 @@ static HRESULT NumberConstr_value(DispatchEx *dispex, LCID lcid, WORD flags, DIS
static
HRESULT
alloc_number
(
script_ctx_t
*
ctx
,
BOOL
use_constr
,
NumberInstance
**
ret
)
{
NumberInstance
*
number
=
heap_alloc_zero
(
sizeof
(
NumberInstance
))
;
NumberInstance
*
number
;
HRESULT
hres
;
number
=
heap_alloc_zero
(
sizeof
(
NumberInstance
));
if
(
!
number
)
return
E_OUTOFMEMORY
;
if
(
use_constr
)
hres
=
init_dispex_from_constr
(
&
number
->
dispex
,
ctx
,
&
Number_info
,
ctx
->
number_constr
);
else
...
...
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