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
7025db43
Commit
7025db43
authored
Sep 06, 2011
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rasapi32: Return error on invalid parameters.
parent
33736bb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
rasapi.c
dlls/rasapi32/rasapi.c
+4
-0
rasapi.c
dlls/rasapi32/tests/rasapi.c
+0
-4
No files found.
dlls/rasapi32/rasapi.c
View file @
7025db43
...
@@ -250,6 +250,10 @@ DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA lpRasDevinfo, LPDWORD lpcb, LPDWORD l
...
@@ -250,6 +250,10 @@ DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA lpRasDevinfo, LPDWORD lpcb, LPDWORD l
return
ERROR_INVALID_PARAMETER
;
return
ERROR_INVALID_PARAMETER
;
FIXME
(
"(%p,%p,%p),stub!
\n
"
,
lpRasDevinfo
,
lpcb
,
lpcDevices
);
FIXME
(
"(%p,%p,%p),stub!
\n
"
,
lpRasDevinfo
,
lpcb
,
lpcDevices
);
if
(
lpRasDevinfo
&&
lpRasDevinfo
->
dwSize
!=
sizeof
(
RASDEVINFOA
))
return
ERROR_INVALID_SIZE
;
if
(
!
lpRasDevinfo
||
(
*
lpcb
<
sizeof
(
RASDEVINFOA
)))
{
if
(
!
lpRasDevinfo
||
(
*
lpcb
<
sizeof
(
RASDEVINFOA
)))
{
*
lpcb
=
sizeof
(
RASDEVINFOA
);
*
lpcb
=
sizeof
(
RASDEVINFOA
);
return
ERROR_BUFFER_TOO_SMALL
;
return
ERROR_BUFFER_TOO_SMALL
;
...
...
dlls/rasapi32/tests/rasapi.c
View file @
7025db43
...
@@ -85,7 +85,6 @@ static void test_rasenum(void)
...
@@ -85,7 +85,6 @@ static void test_rasenum(void)
rasDevInfo
[
0
].
dwSize
=
0
;
rasDevInfo
[
0
].
dwSize
=
0
;
cb
=
bufsize
;
cb
=
bufsize
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
todo_wine
ok
(
result
==
ERROR_INVALID_SIZE
||
ok
(
result
==
ERROR_INVALID_SIZE
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
...
@@ -93,7 +92,6 @@ static void test_rasenum(void)
...
@@ -93,7 +92,6 @@ static void test_rasenum(void)
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
)
-
1
;
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
)
-
1
;
cb
=
bufsize
;
cb
=
bufsize
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
todo_wine
ok
(
result
==
ERROR_INVALID_SIZE
||
ok
(
result
==
ERROR_INVALID_SIZE
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
...
@@ -101,7 +99,6 @@ static void test_rasenum(void)
...
@@ -101,7 +99,6 @@ static void test_rasenum(void)
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
)
+
1
;
rasDevInfo
[
0
].
dwSize
=
sizeof
(
RASDEVINFOA
)
+
1
;
cb
=
bufsize
;
cb
=
bufsize
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
todo_wine
ok
(
result
==
ERROR_INVALID_SIZE
||
ok
(
result
==
ERROR_INVALID_SIZE
||
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
result
==
ERROR_INVALID_USER_BUFFER
,
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
...
@@ -151,7 +148,6 @@ static void test_rasenum(void)
...
@@ -151,7 +148,6 @@ static void test_rasenum(void)
cb
=
0
;
cb
=
0
;
rasDevInfo
[
0
].
dwSize
=
0
;
rasDevInfo
[
0
].
dwSize
=
0
;
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
result
=
pRasEnumDevicesA
(
rasDevInfo
,
&
cb
,
&
cDevices
);
todo_wine
ok
(
result
==
ERROR_INVALID_SIZE
||
ok
(
result
==
ERROR_INVALID_SIZE
||
broken
(
result
==
ERROR_BUFFER_TOO_SMALL
),
/* win98 */
broken
(
result
==
ERROR_BUFFER_TOO_SMALL
),
/* win98 */
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
"Expected ERROR_INVALID_SIZE, got %08d
\n
"
,
result
);
...
...
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