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
693da8c4
Commit
693da8c4
authored
May 03, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Check that the storage was opened with write access before creating a new…
ole32: Check that the storage was opened with write access before creating a new stream or sub-storage.
parent
5d051af6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
storage32.c
dlls/ole32/storage32.c
+10
-0
storage32.c
dlls/ole32/tests/storage32.c
+0
-2
No files found.
dlls/ole32/storage32.c
View file @
693da8c4
...
@@ -914,6 +914,11 @@ HRESULT WINAPI StorageBaseImpl_CreateStream(
...
@@ -914,6 +914,11 @@ HRESULT WINAPI StorageBaseImpl_CreateStream(
else
else
return
STG_E_FILEALREADYEXISTS
;
return
STG_E_FILEALREADYEXISTS
;
}
}
else
if
(
STGM_ACCESS_MODE
(
This
->
openFlags
)
==
STGM_READ
)
{
WARN
(
"read-only storage
\n
"
);
return
STG_E_ACCESSDENIED
;
}
/*
/*
* memset the empty property
* memset the empty property
...
@@ -1120,6 +1125,11 @@ HRESULT WINAPI StorageImpl_CreateStorage(
...
@@ -1120,6 +1125,11 @@ HRESULT WINAPI StorageImpl_CreateStorage(
return
STG_E_FILEALREADYEXISTS
;
return
STG_E_FILEALREADYEXISTS
;
}
}
}
}
else
if
(
STGM_ACCESS_MODE
(
This
->
base
.
openFlags
)
==
STGM_READ
)
{
WARN
(
"read-only storage
\n
"
);
return
STG_E_ACCESSDENIED
;
}
/*
/*
* memset the empty property
* memset the empty property
...
...
dlls/ole32/tests/storage32.c
View file @
693da8c4
...
@@ -719,10 +719,8 @@ static void test_storage_refcount(void)
...
@@ -719,10 +719,8 @@ static void test_storage_refcount(void)
r
=
IStorage_CreateStorage
(
stg2
,
stgname2
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
0
,
&
stg3
);
r
=
IStorage_CreateStorage
(
stg2
,
stgname2
,
STGM_SHARE_EXCLUSIVE
|
STGM_READWRITE
,
0
,
0
,
&
stg3
);
ok
(
r
==
STG_E_ACCESSDENIED
,
"CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08lx
\n
"
,
r
);
ok
(
r
==
STG_E_ACCESSDENIED
,
"CreateStorage should have returned STG_E_ACCESSDENIED instead of 0x%08lx
\n
"
,
r
);
todo_wine
{
r
=
IStorage_CreateStream
(
stg2
,
stmname2
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
,
0
,
0
,
&
stm
);
r
=
IStorage_CreateStream
(
stg2
,
stmname2
,
STGM_CREATE
|
STGM_SHARE_EXCLUSIVE
,
0
,
0
,
&
stm
);
ok
(
r
==
STG_E_ACCESSDENIED
,
"CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08lx
\n
"
,
r
);
ok
(
r
==
STG_E_ACCESSDENIED
,
"CreateStream should have returned STG_E_ACCESSDENIED instead of 0x%08lx
\n
"
,
r
);
}
IStorage_Release
(
stg2
);
IStorage_Release
(
stg2
);
...
...
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