From: "ordex (Code Review)" Date: Wed, 27 Mar 2024 10:48:48 +0000 In-Reply-To: References: Reply-To: a@...2181..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="7aBq0RbZFWk="; charset=UTF-8 Subject: [Openvpn-devel] [L] Change in openvpn[master]: Remove openvpn_snprintf and similar functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos Cc: flichtenheld , openvpn-devel --7aBq0RbZFWk= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Attention is currently required from: flichtenheld, plaisthos. ordex has posted comments on this change. ( http://gerrit.openvpn.net/c/ope= nvpn/+/547?usp=3Demail ) Change subject: Remove openvpn_snprintf and similar functions ...................................................................... Patch Set 2: (5 comments) Patchset: PS2: some nit picks below.. File src/openvpn/proxy.c: http://gerrit.openvpn.net/c/openvpn/+/547/comment/d2c89116_22dbc48e : PS2, Line 962: if (sret >=3D sizeof(buf)) if this can truly happen, does it mean that the buffer is undersized compar= ed to the size of all variables we are putting together? Therefore, wouldn't it make more sense to extend the size of the buffer to = ensure that no matter what we save in those variables, we will always be ab= le to create the HTTP header? Or there is a limit with the HTTP header that we have to deal with? My concern is that we are not preventing people from filling those variable= s as they please, but we will then fail to put them together for no good re= ason. does it make sense? File src/openvpn/socks.c: http://gerrit.openvpn.net/c/openvpn/+/547/comment/8bdf0e3c_8356c931 : PS2, Line 114: (int) strlen(creds.username), creds.= username, normally we don't put a paceb etween the cast and the variable name. This comments applies to all other casts below http://gerrit.openvpn.net/c/openvpn/+/547/comment/b417986e_a5f333df : PS2, Line 116: ASSERT(sret <=3D sizeof(to_send)); why ASSERT here while in other cases we just go to error or cleanup? File tests/unit_tests/openvpn/test_buffer.c: http://gerrit.openvpn.net/c/openvpn/+/547/comment/f8c8a505_dbfb9729 : PS2, Line 369: * for this unit test. We know that are doing this that = are truncated I think there is some typ0 here. Maybe something like: "We know that results will be truncated and we actual= ly want to test that". -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/547?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I07096977e3b562bcb5d2c6f11673a4175b8e12ac Gerrit-Change-Number: 547 Gerrit-PatchSet: 2 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-Reviewer: ordex Gerrit-Reviewer: plaisthos Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Wed, 27 Mar 2024 10:48:48 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment --7aBq0RbZFWk= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Attention is currently required from: flichtenheld, plaisthos.

View C= hange

5 comments: