From d62fb298662cbf9dce2cdd5d8b62562b7f981803 Mon Sep 17 00:00:00 2001 From: Hugh McMaster Date: Thu, 20 Jul 2017 11:33:24 +0000 Subject: [PATCH] regedit: Re-size the data export buffer using the required size instead of doubling it. Signed-off-by: Hugh McMaster Signed-off-by: Alexandre Julliard --- programs/regedit/regproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index b726251c810..394023b6380 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -1384,7 +1384,7 @@ static int export_registry_data(FILE *fp, HKEY key, WCHAR *path, BOOL unicode) { if (data_size > max_data_bytes) { - max_data_bytes *= 2; + max_data_bytes = data_size; data = resize_buffer(data, max_data_bytes); } else