Attention is currently required from: neels, laforge, fixeria, pespin, msuraev.
msuraev has posted comments on this change. (
https://gerrit.osmocom.org/c/libosmocore/+/28993 )
Change subject: Update multiaddr helper
......................................................................
Patch Set 14:
(5 comments)
This change is ready for review.
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/10b1579c_df3fe954
PS13, Line 10: * properly handle OOM
OOM is not the responsibility of functions like
snprintf(), the caller shall check rc < len
Done
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/ccb888a8_bf79f780
PS13, Line 229: const struct sockaddr *addr = &(*addrs)[i];
to conform with typical osmo style, suggest using
struct osmo_sockaddr instead, and below use addr. […]
Simply changing addr type to
"const struct osmo_sockaddr *" leads to memory corruption. Perhaps that's
because we're casting from double pointer (we receive array of sockaddr structs)? Did
I misunderstood your suggestion?
https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/2e9664a6_cb459aa7
PS13, Line 244: OSMO_STRBUF_PRINTF(*sb, "%s%s", oss->ip, after);
no need to use osmo_sockaddr_str here, instead do […]
We can't use osmo_sockaddr_to_str_buf2 because it always prints port in addition
to host. I've added similar function in preceeding patch.
https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/e2bf3560_19ed923a
PS13, Line 252: return -ENOSPC;
do not size check!! this breaks the osmo_strbuf usage.
[…]
Done
https://gerrit.osmocom.org/c/libosmocore/+/28993/comment/31718281_3658a78a
PS13, Line 260:
just put the function block of multiaddr_strbuf() in
here. […]
Done
--
To view, visit
https://gerrit.osmocom.org/c/libosmocore/+/28993
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icef53fe4b6e51563d97a1bc48001d67679b3b6e9
Gerrit-Change-Number: 28993
Gerrit-PatchSet: 14
Gerrit-Owner: msuraev <msuraev(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: msuraev <msuraev(a)sysmocom.de>
Gerrit-Comment-Date: Sat, 18 Feb 2023 17:07:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment