Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5e43ee25
Commit
5e43ee25
authored
Dec 03, 2013
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Check for lpSurface=NULL in SetSurfaceDesc.
parent
c15d89c8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
surface.c
dlls/ddraw/surface.c
+2
-2
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+4
-0
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+4
-0
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+4
-0
No files found.
dlls/ddraw/surface.c
View file @
5e43ee25
...
@@ -4259,9 +4259,9 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface,
...
@@ -4259,9 +4259,9 @@ static HRESULT WINAPI ddraw_surface7_SetSurfaceDesc(IDirectDrawSurface7 *iface,
WARN
(
"Invalid flags (0x%08x) set, returning DDERR_INVALIDPARAMS
\n
"
,
DDSD
->
dwFlags
);
WARN
(
"Invalid flags (0x%08x) set, returning DDERR_INVALIDPARAMS
\n
"
,
DDSD
->
dwFlags
);
return
DDERR_INVALIDPARAMS
;
return
DDERR_INVALIDPARAMS
;
}
}
if
(
!
(
DDSD
->
dwFlags
&
DDSD_LPSURFACE
))
if
(
!
(
DDSD
->
dwFlags
&
DDSD_LPSURFACE
)
||
!
DDSD
->
lpSurface
)
{
{
WARN
(
"DDSD_LPSURFACE is not set, returning DDERR_INVALIDPARAMS
\n
"
);
WARN
(
"DDSD_LPSURFACE is not set
or lpSurface is NULL
, returning DDERR_INVALIDPARAMS
\n
"
);
return
DDERR_INVALIDPARAMS
;
return
DDERR_INVALIDPARAMS
;
}
}
if
((
DDSD
->
dwFlags
&
DDSD_CAPS
)
&&
DDSD
->
ddsCaps
.
dwCaps
)
if
((
DDSD
->
dwFlags
&
DDSD_CAPS
)
&&
DDSD
->
ddsCaps
.
dwCaps
)
...
...
dlls/ddraw/tests/ddraw2.c
View file @
5e43ee25
...
@@ -4471,6 +4471,10 @@ static void test_set_surface_desc(void)
...
@@ -4471,6 +4471,10 @@ static void test_set_surface_desc(void)
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
&
ddsd
,
1
);
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
&
ddsd
,
1
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
ddsd
.
lpSurface
=
NULL
;
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
&
ddsd
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Setting lpSurface=NULL returned %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
NULL
,
0
);
hr
=
IDirectDrawSurface3_SetSurfaceDesc
(
surface3
,
NULL
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with NULL desc returned %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with NULL desc returned %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
5e43ee25
...
@@ -5072,6 +5072,10 @@ static void test_set_surface_desc(void)
...
@@ -5072,6 +5072,10 @@ static void test_set_surface_desc(void)
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
&
ddsd
,
1
);
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
&
ddsd
,
1
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
ddsd
.
lpSurface
=
NULL
;
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
&
ddsd
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Setting lpSurface=NULL returned %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
NULL
,
0
);
hr
=
IDirectDrawSurface4_SetSurfaceDesc
(
surface
,
NULL
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with NULL desc returned %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with NULL desc returned %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
5e43ee25
...
@@ -4959,6 +4959,10 @@ static void test_set_surface_desc(void)
...
@@ -4959,6 +4959,10 @@ static void test_set_surface_desc(void)
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
&
ddsd
,
1
);
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
&
ddsd
,
1
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with flags=1 returned %#x.
\n
"
,
hr
);
ddsd
.
lpSurface
=
NULL
;
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
&
ddsd
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"Setting lpSurface=NULL returned %#x.
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
NULL
,
0
);
hr
=
IDirectDrawSurface7_SetSurfaceDesc
(
surface
,
NULL
,
0
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with NULL desc returned %#x.
\n
"
,
hr
);
ok
(
hr
==
DDERR_INVALIDPARAMS
,
"SetSurfaceDesc with NULL desc returned %#x.
\n
"
,
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