regedit: Re-size the data export buffer using the required size instead of doubling it.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2017-07-20 11:33:24 +00:00 committed by Alexandre Julliard
parent 9d23db6b12
commit d62fb29866
1 changed files with 1 additions and 1 deletions

View File

@ -1384,7 +1384,7 @@ static int export_registry_data(FILE *fp, HKEY key, WCHAR *path, BOOL unicode)
{ {
if (data_size > max_data_bytes) if (data_size > max_data_bytes)
{ {
max_data_bytes *= 2; max_data_bytes = data_size;
data = resize_buffer(data, max_data_bytes); data = resize_buffer(data, max_data_bytes);
} }
else else