Attention is currently required from: Arne Schwabe.

Hello Arne Schwabe,

I'd like you to do a code review.
Please visit

    https://gerrit.openvpn.net/c/openvpn/+/2127?usp=email

to review the following change.


Change subject: tun: return NULL when the second adapter info query fails
......................................................................

tun: return NULL when the second adapter info query fails

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]>
---
M src/openvpn/tun.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/27/2127/1

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;

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I2d677eeb6ae9186ede2aeb3c2e0c12d25c935fcd
Gerrit-Change-Number: 2127
Gerrit-PatchSet: 1
Gerrit-Owner: Răzvan Cojocaru <[email protected]>
Gerrit-Reviewer: Arne Schwabe <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: Arne Schwabe <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to