Commit f4f33686 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

ntdll: Make sure buffer allocated in get_cached_dir_data is big enough for returned entry.

parent 78d9a850
......@@ -2302,7 +2302,7 @@ static NTSTATUS get_cached_dir_data( HANDLE handle, struct dir_data **data_ret,
if (entry >= dir_data_cache_size)
{
unsigned int size = max( dir_data_cache_initial_size, dir_data_cache_size * 2 );
unsigned int size = max( dir_data_cache_initial_size, max( dir_data_cache_size * 2, entry + 1 ) );
struct dir_data **new_cache;
if (dir_data_cache)
......
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