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
93a15538
Commit
93a15538
authored
May 29, 2009
by
Vincent Povirk
Committed by
Alexandre Julliard
Jun 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Fix crash when calling CreateStorage on read only storage.
parent
4a0901fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
storage32.c
dlls/ole32/storage32.c
+2
-1
storage32.c
dlls/ole32/tests/storage32.c
+0
-2
No files found.
dlls/ole32/storage32.c
View file @
93a15538
...
...
@@ -1230,7 +1230,8 @@ static HRESULT WINAPI StorageImpl_CreateStorage(
/*
* An element with this name already exists
*/
if
(
STGM_CREATE_MODE
(
grfMode
)
==
STGM_CREATE
)
if
(
STGM_CREATE_MODE
(
grfMode
)
==
STGM_CREATE
&&
STGM_ACCESS_MODE
(
This
->
base
.
openFlags
)
!=
STGM_READ
)
IStorage_DestroyElement
(
iface
,
pwcsName
);
else
{
...
...
dlls/ole32/tests/storage32.c
View file @
93a15538
...
...
@@ -1314,13 +1314,11 @@ void test_readonly(void)
if
(
SUCCEEDED
(
hr
))
IStream_Release
(
stream
);
#if 0 /* crashes on Wine */
/* CreateStorage on read-only storage, name exists */
hr
=
IStorage_CreateStorage
(
stg2
,
streamW
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READ
,
0
,
0
,
&
stg3
);
ok
(
hr
==
STG_E_FILEALREADYEXISTS
,
"should fail, res=%x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IStream_Release
(
stg3
);
#endif
/* CreateStorage on read-only storage, name does not exist */
hr
=
IStorage_CreateStorage
(
stg2
,
storageW
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
|
STGM_READ
,
0
,
0
,
&
stg3
);
...
...
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