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
3f2da592
Commit
3f2da592
authored
Jul 19, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Null-terminate strings returned by VFAT_IOCTL_READDIR_BOTH to work around a kernel bug.
parent
5ede40ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
directory.c
dlls/ntdll/directory.c
+9
-0
No files found.
dlls/ntdll/directory.c
View file @
3f2da592
...
...
@@ -911,6 +911,9 @@ static int read_directory_vfat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG
while
(
res
!=
-
1
)
{
if
(
!
de
[
0
].
d_reclen
)
break
;
/* make sure names are null-terminated to work around an x86-64 kernel bug */
if
(
de
[
0
].
d_reclen
<
sizeof
(
de
[
0
].
d_name
))
de
[
0
].
d_name
[
de
[
0
].
d_reclen
]
=
0
;
if
(
de
[
1
].
d_reclen
<
sizeof
(
de
[
1
].
d_name
))
de
[
1
].
d_name
[
de
[
1
].
d_reclen
]
=
0
;
if
(
de
[
1
].
d_name
[
0
])
info
=
append_entry
(
buffer
,
&
io
->
Information
,
length
,
de
[
1
].
d_name
,
de
[
0
].
d_name
,
mask
);
...
...
@@ -942,6 +945,9 @@ static int read_directory_vfat( int fd, IO_STATUS_BLOCK *io, void *buffer, ULONG
while
(
res
!=
-
1
)
{
if
(
!
de
[
0
].
d_reclen
)
break
;
/* make sure names are null-terminated to work around an x86-64 kernel bug */
if
(
de
[
0
].
d_reclen
<
sizeof
(
de
[
0
].
d_name
))
de
[
0
].
d_name
[
de
[
0
].
d_reclen
]
=
0
;
if
(
de
[
1
].
d_reclen
<
sizeof
(
de
[
1
].
d_name
))
de
[
1
].
d_name
[
de
[
1
].
d_reclen
]
=
0
;
if
(
de
[
1
].
d_name
[
0
])
info
=
append_entry
(
buffer
,
&
io
->
Information
,
length
,
de
[
1
].
d_name
,
de
[
0
].
d_name
,
mask
);
...
...
@@ -1247,6 +1253,9 @@ static NTSTATUS find_file_in_dir( char *unix_name, int pos, const WCHAR *name, i
for
(;;)
{
if
(
!
de
[
0
].
d_reclen
)
break
;
/* make sure names are null-terminated to work around an x86-64 kernel bug */
if
(
de
[
0
].
d_reclen
<
sizeof
(
de
[
0
].
d_name
))
de
[
0
].
d_name
[
de
[
0
].
d_reclen
]
=
0
;
if
(
de
[
1
].
d_reclen
<
sizeof
(
de
[
1
].
d_name
))
de
[
1
].
d_name
[
de
[
1
].
d_reclen
]
=
0
;
if
(
de
[
1
].
d_name
[
0
])
{
...
...
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