[PATCH 2/2] ntdll: Use swapping method to return . and .. as first entries. (try 4)

Alexandre Julliard julliard at winehq.org
Thu Aug 4 09:47:10 CDT 2011


Grazvydas Ignotas <notasas at gmail.com> writes:

> -            /* check if we still have enough space for the largest possible entry */
> -            if (last_info && io->Information + max_dir_info_size(class) > length)
> -            {
> -                lseek( fd, 0, SEEK_SET );  /* reset pos to first entry */
> -                res = 0;
> -            }
> +            filename = read_first_dent_name( swap_to, fd, next_pos, second_entry_pos,
> +                                             &de_first_two, buffer, size );
> +            if (filename != NULL && (!strcmp( filename, "." ) || !strcmp( filename, ".." )))
> +                filename = read_first_dent_name( swap_to ^ 1, fd, next_pos, second_entry_pos,
> +                                                 &de_first_two, buffer, size );

"buffer" is the user's buffer, you can't read into that.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list