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
d3057eef
Commit
d3057eef
authored
Jun 26, 2018
by
Marcus Meissner
Committed by
Alexandre Julliard
Jun 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: GetVolumePathNamesForVolumeNameW gets character as buffer size.
Signed-off-by:
Marcus Meissner
<
meissner@suse.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0807725f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
volume.c
dlls/kernel32/tests/volume.c
+7
-7
No files found.
dlls/kernel32/tests/volume.c
View file @
d3057eef
...
...
@@ -983,7 +983,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void)
return
;
}
ret
=
pGetVolumeNameForVolumeMountPointW
(
drive_c
,
volume
,
sizeof
(
volume
)
/
sizeof
(
volume
[
0
]
)
);
ret
=
pGetVolumeNameForVolumeMountPointW
(
drive_c
,
volume
,
ARRAY_SIZE
(
volume
)
);
ok
(
ret
,
"failed to get volume name %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
...
...
@@ -1005,16 +1005,16 @@ static void test_GetVolumePathNamesForVolumeNameW(void)
ok
(
error
==
ERROR_MORE_DATA
,
"expected ERROR_MORE_DATA got %u
\n
"
,
error
);
if
(
0
)
{
/* crash */
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
NULL
,
sizeof
(
buffer
),
NULL
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
NULL
,
ARRAY_SIZE
(
buffer
),
NULL
);
ok
(
ret
,
"failed to get path names %u
\n
"
,
GetLastError
());
}
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
sizeof
(
buffer
),
NULL
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
ARRAY_SIZE
(
buffer
),
NULL
);
ok
(
ret
,
"failed to get path names %u
\n
"
,
GetLastError
());
len
=
0
;
memset
(
buffer
,
0xff
,
sizeof
(
buffer
)
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
sizeof
(
buffer
),
&
len
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
ARRAY_SIZE
(
buffer
),
&
len
);
ok
(
ret
,
"failed to get path names %u
\n
"
,
GetLastError
());
ok
(
len
==
5
,
"expected 5 got %u
\n
"
,
len
);
ok
(
!
buffer
[
4
],
"expected double null-terminated buffer
\n
"
);
...
...
@@ -1023,7 +1023,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void)
volume
[
1
]
=
'?'
;
volume
[
lstrlenW
(
volume
)
-
1
]
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
sizeof
(
buffer
),
&
len
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
ARRAY_SIZE
(
buffer
),
&
len
);
error
=
GetLastError
();
ok
(
!
ret
,
"expected failure
\n
"
);
ok
(
error
==
ERROR_INVALID_NAME
,
"expected ERROR_INVALID_NAME got %u
\n
"
,
error
);
...
...
@@ -1032,7 +1032,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void)
volume
[
0
]
=
'\\'
;
volume
[
1
]
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
sizeof
(
buffer
),
&
len
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
ARRAY_SIZE
(
buffer
),
&
len
);
error
=
GetLastError
();
ok
(
!
ret
,
"expected failure
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got %u
\n
"
,
error
);
...
...
@@ -1040,7 +1040,7 @@ static void test_GetVolumePathNamesForVolumeNameW(void)
len
=
0
;
lstrcpyW
(
volume
,
volume_null
);
SetLastError
(
0xdeadbeef
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
sizeof
(
buffer
),
&
len
);
ret
=
pGetVolumePathNamesForVolumeNameW
(
volume
,
buffer
,
ARRAY_SIZE
(
buffer
),
&
len
);
error
=
GetLastError
();
ok
(
!
ret
,
"expected failure
\n
"
);
ok
(
error
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND got %u
\n
"
,
error
);
...
...
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