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
5d2f8023
Commit
5d2f8023
authored
Nov 13, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Nov 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Validate the parameters to DataCache_Cache.
parent
f94b8202
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
datacache.c
dlls/ole32/datacache.c
+4
-0
ole2.c
dlls/ole32/tests/ole2.c
+6
-0
No files found.
dlls/ole32/datacache.c
View file @
5d2f8023
...
...
@@ -1971,6 +1971,10 @@ static HRESULT WINAPI DataCache_Cache(
HRESULT
hr
;
TRACE
(
"(%p, 0x%x, %p)
\n
"
,
pformatetc
,
advf
,
pdwConnection
);
if
(
!
pformatetc
||
!
pdwConnection
)
return
E_INVALIDARG
;
TRACE
(
"pformatetc = %s
\n
"
,
debugstr_formatetc
(
pformatetc
));
*
pdwConnection
=
0
;
...
...
dlls/ole32/tests/ole2.c
View file @
5d2f8023
...
...
@@ -1128,6 +1128,12 @@ static void test_data_cache(void)
hr
=
IOleCache_Uncache
(
pOleCache
,
0xdeadbeef
);
ok
(
hr
==
OLE_E_NOCONNECTION
,
"IOleCache_Uncache with invalid value should return OLE_E_NOCONNECTION instead of 0x%x
\n
"
,
hr
);
hr
=
IOleCache_Cache
(
pOleCache
,
NULL
,
0
,
&
dwConnection
);
ok
(
hr
==
E_INVALIDARG
,
"IOleCache_Cache with NULL fmtetc should have returned E_INVALIDARG instead of 0x%08x
\n
"
,
hr
);
hr
=
IOleCache_Cache
(
pOleCache
,
NULL
,
0
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"IOleCache_Cache with NULL pdwConnection should have returned E_INVALIDARG instead of 0x%08x
\n
"
,
hr
);
for
(
fmtetc
.
cfFormat
=
CF_TEXT
;
fmtetc
.
cfFormat
<
CF_MAX
;
fmtetc
.
cfFormat
++
)
{
int
i
;
...
...
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