Attention is currently required from: jolly, laforge.
pespin has posted comments on this change by jolly. (
https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email )
Change subject: Avoid reusing pending buffer; append incoming data instead
......................................................................
Patch Set 5: Code-Review-1
(2 comments)
File src/core/osmo_io.c:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/9d8103ce_38c932d7?… :
PS5, Line 338: pending = iofd_msgb_alloc2(iofd, msgb_length(iofd->pending) +
msgb_length(msg));
AFAICT this is not fullfilling the requirement that:
(msgb_length(iofd->pending) + msgb_length(msg)) >= iofd->msgb_alloc.size)
What I meant: msgb_length(iofd->pending) + msgb_length(msg) may be lower than
iofd->msgb_alloc.size, which means user will end up with a msgb smaller than expected.
File src/core/osmo_io_internal.h:
https://gerrit.osmocom.org/c/libosmocore/+/40584/comment/d844b3a0_60f477c0?… :
PS5, Line 156: struct msgb *iofd_msgb_alloc2(struct osmo_io_fd *iofd, size_t extra);
this pnew param is named "size" now in the .c file.
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/40584?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I08df9736ccc5e9a7df61ca6dcf94629ee010752f
Gerrit-Change-Number: 40584
Gerrit-PatchSet: 5
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Mon, 28 Jul 2025 10:52:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes