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
f7b2add8
Commit
f7b2add8
authored
Aug 24, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32/olepicture: Remove out pointer check in OleCreatePictureIndirect, it should crash.
parent
b8f99cab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
13 deletions
+12
-13
olepicture.c
dlls/oleaut32/olepicture.c
+3
-12
olepicture.c
dlls/oleaut32/tests/olepicture.c
+9
-1
No files found.
dlls/oleaut32/olepicture.c
View file @
f7b2add8
...
...
@@ -2142,25 +2142,16 @@ static const IConnectionPointContainerVtbl OLEPictureImpl_IConnectionPointContai
* OleCreatePictureIndirect (OLEAUT32.419)
*/
HRESULT
WINAPI
OleCreatePictureIndirect
(
LPPICTDESC
lpPictDesc
,
REFIID
riid
,
BOOL
fOwn
,
LPVOID
*
ppvObj
)
BOOL
Own
,
void
*
*
ppvObj
)
{
OLEPictureImpl
*
newPict
;
HRESULT
hr
;
TRACE
(
"(%p,%s,%d,%p)
\n
"
,
lpPictDesc
,
debugstr_guid
(
riid
),
fOwn
,
ppvObj
);
/*
* Sanity check
*/
if
(
ppvObj
==
0
)
return
E_POINTER
;
TRACE
(
"(%p,%s,%d,%p)
\n
"
,
lpPictDesc
,
debugstr_guid
(
riid
),
Own
,
ppvObj
);
*
ppvObj
=
NULL
;
/*
* Try to construct a new instance of the class.
*/
newPict
=
OLEPictureImpl_Construct
(
lpPictDesc
,
fOwn
);
newPict
=
OLEPictureImpl_Construct
(
lpPictDesc
,
Own
);
if
(
newPict
==
NULL
)
return
E_OUTOFMEMORY
;
...
...
dlls/oleaut32/tests/olepicture.c
View file @
f7b2add8
...
...
@@ -481,10 +481,10 @@ static void test_Invoke(void)
static
void
test_OleCreatePictureIndirect
(
void
)
{
OLE_HANDLE
handle
;
IPicture
*
pict
;
HRESULT
hr
;
short
type
;
OLE_HANDLE
handle
;
if
(
!
pOleCreatePictureIndirect
)
{
...
...
@@ -492,13 +492,21 @@ static void test_OleCreatePictureIndirect(void)
return
;
}
if
(
0
)
{
/* crashes on native */
hr
=
pOleCreatePictureIndirect
(
NULL
,
&
IID_IPicture
,
TRUE
,
NULL
);
}
hr
=
pOleCreatePictureIndirect
(
NULL
,
&
IID_IPicture
,
TRUE
,
(
void
**
)
&
pict
);
ok
(
hr
==
S_OK
,
"hr %08x
\n
"
,
hr
);
type
=
PICTYPE_NONE
;
hr
=
IPicture_get_Type
(
pict
,
&
type
);
ok
(
hr
==
S_OK
,
"hr %08x
\n
"
,
hr
);
ok
(
type
==
PICTYPE_UNINITIALIZED
,
"type %d
\n
"
,
type
);
handle
=
0xdeadbeef
;
hr
=
IPicture_get_Handle
(
pict
,
&
handle
);
ok
(
hr
==
S_OK
,
"hr %08x
\n
"
,
hr
);
ok
(
handle
==
0
,
"handle %08x
\n
"
,
handle
);
...
...
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