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/+/2146?usp=email

to review the following change.


Change subject: reflect_filter: zero the rate limiter on allocation
......................................................................

reflect_filter: zero the rate limiter on allocation

initial_rate_limit_init() allocates with ALLOC_OBJ, which does not
clear, and then assigns every field but warning_displayed. That one is
read on the path that warns about --connect-freq-initial being hit, so
whether the warning appears at all is down to whatever the heap handed
us.

Use ALLOC_OBJ_CLEAR, which is also what keeps a field added later from
starting out undefined.

Change-Id: Ied9e36d45b30a88610cafee668ecefa98b29eddc
Signed-off-by: Lev Stipakov <[email protected]>
---
M src/openvpn/reflect_filter.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/46/2146/1

diff --git a/src/openvpn/reflect_filter.c b/src/openvpn/reflect_filter.c
index e5226e4..6059e44 100644
--- a/src/openvpn/reflect_filter.c
+++ b/src/openvpn/reflect_filter.c
@@ -89,7 +89,7 @@
     struct initial_packet_rate_limit *irl;


-    ALLOC_OBJ(irl, struct initial_packet_rate_limit);
+    ALLOC_OBJ_CLEAR(irl, struct initial_packet_rate_limit);

     irl->max_per_period = max_per_period;
     irl->period_length = period_length;

--
To view, visit https://gerrit.openvpn.net/c/openvpn/+/2146?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: Ied9e36d45b30a88610cafee668ecefa98b29eddc
Gerrit-Change-Number: 2146
Gerrit-PatchSet: 1
Gerrit-Owner: Lev Stipakov <[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