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
4d156249
Commit
4d156249
authored
May 09, 2005
by
Juan Lang
Committed by
Alexandre Julliard
May 09, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct/improve error checking in IPropertyStorage.
parent
d40517cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
stg_prop.c
dlls/ole32/stg_prop.c
+16
-5
No files found.
dlls/ole32/stg_prop.c
View file @
4d156249
...
...
@@ -519,9 +519,11 @@ static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(
LPWSTR
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
name
)
{
strcpyW
(
name
,
rgpspec
[
i
].
u
.
lpwstr
);
TRACE
(
"Adding prop name %s, propid %ld
\n
"
,
debugstr_w
(
name
)
,
nextId
);
TRACE
(
"Adding prop name %s, propid %ld
\n
"
,
debugstr_w
(
name
),
nextId
);
dictionary_insert
(
This
->
name_to_propid
,
name
,
(
void
*
)
nextId
);
dictionary_insert
(
This
->
propid_to_name
,
(
void
*
)
nextId
,
...
...
@@ -529,6 +531,9 @@ static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(
hr
=
PropertyStorage_StorePropWithId
(
This
,
nextId
,
&
rgpropvar
[
i
],
GetACP
());
}
else
hr
=
STG_E_INSUFFICIENTMEMORY
;
}
}
}
else
...
...
@@ -949,8 +954,7 @@ static HRESULT PropertyStorage_ReadDictionary(PropertyStorage_impl *This,
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
else
{
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
name
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
name
)
MultiByteToWideChar
(
This
->
codePage
,
0
,
ptr
,
cbEntry
,
name
,
len
);
...
...
@@ -1875,7 +1879,7 @@ static HRESULT PropertyStorage_BaseConstruct(IStream *stm,
assert
(
pps
);
assert
(
rfmtid
);
*
pps
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
**
pps
);
if
(
!
pps
)
if
(
!
*
pps
)
return
E_OUTOFMEMORY
;
(
*
pps
)
->
vtbl
=
&
IPropertyStorage_Vtbl
;
...
...
@@ -1886,6 +1890,13 @@ static HRESULT PropertyStorage_BaseConstruct(IStream *stm,
(
*
pps
)
->
grfMode
=
grfMode
;
hr
=
PropertyStorage_CreateDictionaries
(
*
pps
);
if
(
FAILED
(
hr
))
{
IStream_Release
(
stm
);
DeleteCriticalSection
(
&
(
*
pps
)
->
cs
);
HeapFree
(
GetProcessHeap
(),
0
,
*
pps
);
*
pps
=
NULL
;
}
return
hr
;
}
...
...
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