Paul Gofman : iphlpapi: Fix buffer reallocation in get_pid_map().

Alexandre Julliard julliard at winehq.org
Wed Jul 22 16:34:29 CDT 2020


Module: wine
Branch: master
Commit: 3feaca754613df248bc576b801d885baa8637050
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3feaca754613df248bc576b801d885baa8637050

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Wed Jul 22 18:20:33 2020 +0300

iphlpapi: Fix buffer reallocation in get_pid_map().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49590
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/iphlpapi/ipstats.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/iphlpapi/ipstats.c b/dlls/iphlpapi/ipstats.c
index 03e53abfb4..d8c2ce029b 100644
--- a/dlls/iphlpapi/ipstats.c
+++ b/dlls/iphlpapi/ipstats.c
@@ -1912,6 +1912,7 @@ static struct pid_map *get_pid_map( unsigned int *num_entries )
             HeapFree( GetProcessHeap(), 0, buffer );
             return NULL;
         }
+        buffer = new_buffer;
     }
 
     if (!(map = HeapAlloc( GetProcessHeap(), 0, map_count * sizeof(*map) )))




More information about the wine-cvs mailing list