Gert Doering has uploaded a new patch set (#2) to the change originally created 
by Răzvan Cojocaru. ( https://gerrit.openvpn.net/c/openvpn/+/2361?usp=email )

The following approvals got outdated and were removed:
Code-Review+2 by Frank Lichtenheld


Change subject: openvpnmsica: don't reuse the freed adapter address list
......................................................................

openvpnmsica: don't reuse the freed adapter address list

If GetAdaptersAddresses() overflowed on both attempts, find_adapters()
freed the buffer, then walked and freed it again. Fail instead.

Change-Id: Ib7c79652a694313fa398852353bd1719f6ce7634
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Frank Lichtenheld <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2361
Message-Id: <[email protected]>
URL: 
https://www.mail-archive.com/[email protected]/msg42095.html
Signed-off-by: Gert Doering <[email protected]>
---
M src/openvpnmsica/openvpnmsica.c
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/61/2361/2

diff --git a/src/openvpnmsica/openvpnmsica.c b/src/openvpnmsica/openvpnmsica.c
index d2fd9af..0ae8992 100644
--- a/src/openvpnmsica/openvpnmsica.c
+++ b/src/openvpnmsica/openvpnmsica.c
@@ -183,6 +183,7 @@
         }

         free(pAdapterAdresses);
+        pAdapterAdresses = NULL;
         if (ulResult != ERROR_BUFFER_OVERFLOW)
         {
             /* MSDN does not mention GetAdaptersAddresses() to set 
GetLastError().
@@ -193,6 +194,12 @@
             goto cleanup_pAdapterList;
         }
     }
+    if (pAdapterAdresses == NULL)
+    {
+        msg(M_NONFATAL, "%s: GetAdaptersAddresses() kept overflowing", 
__FUNCTION__);
+        uiResult = ERROR_BUFFER_OVERFLOW;
+        goto cleanup_pAdapterList;
+    }

     /* Count adapters. */
     size_t adapter_count = 0;

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2361?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.openvpn.net/settings?usp=email

Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib7c79652a694313fa398852353bd1719f6ce7634
Gerrit-Change-Number: 2361
Gerrit-PatchSet: 2
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-Reviewer: Frank Lichtenheld <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to