[M] Change in openvpn[master]: Add helper method to read an integer from a buffer

"razvanc \(Code Review\) via Openvpn-devel" <[email protected]>
Newsgroups gmane.network.openvpn.devel
Message-ID <e66d88212cdd0adf4188d424870988aa8b0f4355-EmailReviewComments-HTML@gerrit.openvpn.net>
Attention is currently required from: plaisthos.

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

Change subject: Add helper method to read an integer from a buffer
......................................................................


Patch Set 5:

(4 comments)

Patchset:

PS5: 
I am not sure we need `buffer_read_int()` at all, for two reasons:

1. We already have `buf_read_u64()` and other helpers in buffer.h.
2. In acc.c where this is used there are already alternatives used (`atoi_constrained()`) for the other length field.

`extract_field()` may be useful, so keeping just that (and updating the commit description) might be something we want.


File src/openvpn/buffer.h:

http://gerrit.openvpn.net/c/openvpn/+/1855/comment/37092562_8bf7e365?usp=email :
PS5, Line 2261:  * returned string is allocated in the gc_arena. If the seperator character
Typo: "separator".


http://gerrit.openvpn.net/c/openvpn/+/1855/comment/ad4c297a_e74b286e?usp=email :
PS5, Line 2264:  * The buffer is also forward to the point after the seperator character.
Typo: "forwarded to".


File src/openvpn/buffer.c:

http://gerrit.openvpn.net/c/openvpn/+/1855/comment/dc7779ab_c5202ab6?usp=email :
PS5, Line 1400:         if (c >= '0' && c <= '9')
We have `char_class(c, CC_DIGIT)`, would that fit this purpose?



-- 
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1855?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: Ifdd2122a3e60cdb11cc9df67570ab5628bfcdeea
Gerrit-Change-Number: 1855
Gerrit-PatchSet: 5
Gerrit-Owner: plaisthos <[email protected]>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-CC: razvanc <[email protected]>
Gerrit-Attention: plaisthos <[email protected]>
Gerrit-Comment-Date: Wed, 26 Aug 2026 05:55:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.