Attention is currently required from: plaisthos.

Hello plaisthos,

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

    http://gerrit.openvpn.net/c/openvpn/+/1389?usp=email

to review the following change.


Change subject: iservice: make sure buffer size is not zero
......................................................................

iservice: make sure buffer size is not zero

GetItfDnsDomains expects a non-zero size buffer to return the domains
in. Check for the size as well, not just for a valid pointer.

Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0
Reported-by: Marc Heuse <[email protected]>
Reported-by: [email protected]
Signed-off-by: Heiko Hund <[email protected]>
---
M src/openvpnserv/interactive.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/89/1389/1

diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index f64c247..d778e89 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -2149,7 +2149,7 @@
 static LSTATUS
 GetItfDnsDomains(HKEY itf, PCWSTR search_domains, PWSTR domains, PDWORD size)
 {
-    if (domains == NULL || size == 0)
+    if (domains == NULL || size == NULL || *size == 0)
     {
         return ERROR_INVALID_PARAMETER;
     }

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

Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I8b26c65415f5a751f416d80a22cbb7ff14aa27c0
Gerrit-Change-Number: 1389
Gerrit-PatchSet: 1
Gerrit-Owner: d12fk <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to