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

Alexandre Julliard julliard at winehq.org
Thu Jul 20 16:20:35 CDT 2017


Module: wine
Branch: master
Commit: d62fb298662cbf9dce2cdd5d8b62562b7f981803
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d62fb298662cbf9dce2cdd5d8b62562b7f981803

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Thu Jul 20 11:33:24 2017 +0000

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

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 b726251..394023b 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




More information about the wine-cvs mailing list