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/+/2236?usp=email
to review the following change.
Change subject: openvpnserv: zero name server bufs with ZeroMemory
......................................................................
openvpnserv: zero name server bufs with ZeroMemory
The buffers in GetItfDnsServersV4/V6() are NUL terminated at their
start and their end at the start of the functions. For better
readability use ZeroMemory() here.
Change-Id: I1249834b1899461bc8f01e848bea95e30decf60c
Signed-off-by: Heiko Hund <[email protected]>
---
M src/openvpnserv/interactive.c
1 file changed, 2 insertions(+), 4 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/36/2236/1
diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c
index 7ea88a1..6c290ef 100644
--- a/src/openvpnserv/interactive.c
+++ b/src/openvpnserv/interactive.c
@@ -2177,8 +2177,7 @@
static LSTATUS
GetItfDnsServersV4(HKEY itf_key, PSTR addrs, PDWORD size)
{
- addrs[0] = '\0';
- addrs[*size - 1] = '\0';
+ ZeroMemory(addrs, *size);
LSTATUS err;
DWORD s = *size;
@@ -2224,8 +2223,7 @@
static LSTATUS
GetItfDnsServersV6(HKEY itf_key, PSTR addrs, PDWORD size)
{
- addrs[0] = '\0';
- addrs[*size - 1] = '\0';
+ ZeroMemory(addrs, *size);
LSTATUS err;
DWORD s = *size;
--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2236?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: I1249834b1899461bc8f01e848bea95e30decf60c
Gerrit-Change-Number: 2236
Gerrit-PatchSet: 1
Gerrit-Owner: Heiko Hund <[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