From bb48b11508c367936be58fbbe09df891aa9d7f1b Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Wed, 4 May 2016 01:37:06 +0200 Subject: [PATCH] ntdll: Fix buffer allocation check in get_dir_data_space. Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- dlls/ntdll/directory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index dab657ab500..4a34475716a 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -302,7 +302,7 @@ static void *get_dir_data_space( struct dir_data *data, unsigned int size ) struct dir_data_buffer *buffer = data->buffer; void *ret; - if (!buffer || size >= buffer->size - buffer->pos) + if (!buffer || size > buffer->size - buffer->pos) { unsigned int new_size = buffer ? buffer->size * 2 : dir_data_buffer_initial_size; if (new_size < size) new_size = size;