|
From: cron2 (C. Review) <ge...@op...> - 2025-11-14 18:39:38
|
Attention is currently required from: its_Giaan, plaisthos. cron2 has posted comments on this change by its_Giaan. ( http://gerrit.openvpn.net/c/openvpn/+/1348?usp=email ) Change subject: mudp: fix unaligned 32-bit read when parsing peer ID ...................................................................... Patch Set 1: (1 comment) File src/openvpn/mudp.c: http://gerrit.openvpn.net/c/openvpn/+/1348/comment/3f419bdf_37dbf5a2?usp=email : PS1, Line 213: memcpy(&tmp, ptr, sizeof(tmp)); > This reimplements the same logic as buf_read_u32() except that it doesn't advance the buffer. […] I am thinking of something more straightforward... ``` /* peer_id is a 24 byte integer in network byte order */ peer_id = (ptr[1]<<16) + (ptr[2]<<8) + ptr[3] ``` (or the other way round, didn't do the byte order calculations yet)... -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/1348?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: Id0bb4c45d373437ab8dbaff7a311745f9b538cbf Gerrit-Change-Number: 1348 Gerrit-PatchSet: 1 Gerrit-Owner: its_Giaan <gia...@ma...> Gerrit-Reviewer: flichtenheld <fr...@li...> Gerrit-Reviewer: plaisthos <arn...@rf...> Gerrit-CC: cron2 <ge...@gr...> Gerrit-CC: openvpn-devel <ope...@li...> Gerrit-Attention: plaisthos <arn...@rf...> Gerrit-Attention: its_Giaan <gia...@ma...> Gerrit-Comment-Date: Fri, 14 Nov 2025 18:39:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: flichtenheld <fr...@li...> |