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
35a95876
Commit
35a95876
authored
Feb 17, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Feb 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Avoid potential NULL pointer access if HeapAlloc fails.
parent
968d464f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
istream.c
dlls/shlwapi/istream.c
+15
-16
No files found.
dlls/shlwapi/istream.c
View file @
35a95876
...
...
@@ -364,22 +364,21 @@ static const IStreamVtbl SHLWAPI_fsVTable =
*/
static
IStream
*
IStream_Create
(
LPCWSTR
lpszPath
,
HANDLE
hFile
,
DWORD
dwMode
)
{
ISHFileStream
*
fileStream
;
fileStream
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ISHFileStream
));
if
(
fileStream
)
{
fileStream
->
IStream_iface
.
lpVtbl
=
&
SHLWAPI_fsVTable
;
fileStream
->
ref
=
1
;
fileStream
->
hFile
=
hFile
;
fileStream
->
dwMode
=
dwMode
;
fileStream
->
lpszPath
=
StrDupW
(
lpszPath
);
fileStream
->
type
=
0
;
/* FIXME */
fileStream
->
grfStateBits
=
0
;
/* FIXME */
}
TRACE
(
"Returning %p
\n
"
,
fileStream
);
return
&
fileStream
->
IStream_iface
;
ISHFileStream
*
fileStream
;
fileStream
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
ISHFileStream
));
if
(
!
fileStream
)
return
NULL
;
fileStream
->
IStream_iface
.
lpVtbl
=
&
SHLWAPI_fsVTable
;
fileStream
->
ref
=
1
;
fileStream
->
hFile
=
hFile
;
fileStream
->
dwMode
=
dwMode
;
fileStream
->
lpszPath
=
StrDupW
(
lpszPath
);
fileStream
->
type
=
0
;
/* FIXME */
fileStream
->
grfStateBits
=
0
;
/* FIXME */
TRACE
(
"Returning %p
\n
"
,
fileStream
);
return
&
fileStream
->
IStream_iface
;
}
/*************************************************************************
...
...
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