From: Razvan Cojocaru <[email protected]>

get_per_adapter_info() and get_interface_info_list() returned the
allocated but unfilled buffer when the second GetPerAdapterInfo() or
GetInterfaceInfo() call failed, so callers read uninitialized data.
Return NULL, as get_adapter_info_list() already does. All callers
check for it.

Change-Id: I2d677eeb6ae9186ede2aeb3c2e0c12d25c935fcd
Signed-off-by: Razvan Cojocaru <[email protected]>
Acked-by: Frank Lichtenheld <[email protected]>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2127
---

This change was reviewed on Gerrit and approved by at least one
developer. I request to merge it to master.

Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/2127
This mail reflects revision 1 of this Change.

Acked-by according to Gerrit (reflected above):
Frank Lichtenheld <[email protected]>

        
diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c
index 225d8b1..7637dc0 100644
--- a/src/openvpn/tun.c
+++ b/src/openvpn/tun.c
@@ -4129,6 +4129,7 @@
             {
                 msg(M_INFO, "GetPerAdapterInfo #2 failed (status=%lu) : %s", 
status,
                     strerror_win32(status, gc));
+                pi = NULL;
             }
         }
     }
@@ -4158,6 +4159,7 @@
         {
             msg(M_INFO, "GetInterfaceInfo #2 failed (status=%lu) : %s", status,
                 strerror_win32(status, gc));
+            ii = NULL;
         }
     }
     return ii;


_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to