Commit 50c1a6b9 authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed read_directory_getdents for large directories (found by Rein

Klazes).
parent e849a566
...@@ -794,7 +794,12 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U ...@@ -794,7 +794,12 @@ static int read_directory_getdents( int fd, IO_STATUS_BLOCK *io, void *buffer, U
} }
old_pos = de->d_off; old_pos = de->d_off;
/* move on to the next entry */ /* move on to the next entry */
de = (KERNEL_DIRENT64 *)((char *)de + de->d_reclen); if (res > 0) de = (KERNEL_DIRENT64 *)((char *)de + de->d_reclen);
else
{
res = getdents64( fd, data, size );
de = data;
}
} }
if (last_info) last_info->NextEntryOffset = 0; if (last_info) last_info->NextEntryOffset = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment