Attention is currently required from: flichtenheld.

plaisthos has posted comments on this change by flichtenheld. ( 
http://gerrit.openvpn.net/c/openvpn/+/1407?usp=email )

Change subject: packet_id: Avoid conversion warnings
......................................................................


Patch Set 7: Code-Review-1

(3 comments)

File src/openvpn/circ_list.h:

http://gerrit.openvpn.net/c/openvpn/+/1407/comment/dfc48ec0_ef064244?usp=email :
PS7, Line 51:                (obj)->x_cap)
So the array index and the size should be the same type. Before we had int for 
both. Now we have size_t for the size but still int for the index.

This leads all kind of very weird (theorectically) corner case bugs when the 
size can be (theoretically) larger than an index.


File src/openvpn/packet_id.c:

http://gerrit.openvpn.net/c/openvpn/+/1407/comment/81055b9d_6bc76950?usp=email :
PS7, Line 255:             if (diff >= 
(packet_id_type)CIRC_LIST_SIZE(p->seq_list))
Technically since CIRC_LIST_SIZE is no longer restricted to (int), this now 
opens up a theoretical problem unless we ensure or ASSERT on CIRC_LIST_SIZE 
always smaller than INT_MAX.

I think we can ignore this but we might want to add a comment here?


http://gerrit.openvpn.net/c/openvpn/+/1407/comment/4a9c0a52_c7040115?usp=email :
PS7, Line 261:             {
These brackets are confusing. Can we remove them?



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

Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ib0584e8728701cca10ac5675c9cb0e6f5eb901ac
Gerrit-Change-Number: 1407
Gerrit-PatchSet: 7
Gerrit-Owner: flichtenheld <[email protected]>
Gerrit-Reviewer: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]>
Gerrit-Comment-Date: Fri, 12 Jun 2026 14:43:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to