Attention is currently required from: pespin. bucketking657 has posted comments on this change by bucketking657. ( https://gerrit.osmocom.org/c/libosmocore/+/44142?usp=email ) Change subject: gsm: fix one-byte overflow in BCD number encoders ...................................................................... Patch Set 1: (1 comment) File src/gsm/gsm48_ie.c: https://gerrit.osmocom.org/c/libosmocore/+/44142/comment/0cf1bd7d_879177ac?u... : PS1, Line 140: * \param[in] max_len Maximum value of the L octet; \a bcd_lv must have
MY understanding is that you are basically changing the meaning of this parameter here, and hence ch […] I agree. I've reworked the patch locally: max_len stays the size of bcd_lv, the callers are back to passing sizeof(), and the check now accounts for the L octet.
There is one thing I wanted to note: Osmo-sgsn sgsn_libgtp.c passes max_len=8 for the 16-digit IMEISV, which needs 9 bytes. That relies on the current L <= max_len check, and the return code is ignored, so with the stricter check it would silently send an all-zero IMEISV. I have created a patch for this here: https://gerrit.osmocom.org/c/osmo-sgsn/+/44150 So if you agree, I think the right move should be first to review osmo-sgsn patch and upload new patch set here? Or would you prefer to look at them both at same time? -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44142?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: I99521d30896f3d58ecfb28de290bce7e31388fca Gerrit-Change-Number: 44142 Gerrit-PatchSet: 1 Gerrit-Owner: bucketking657 <joshuashilts@gmail.com> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: pespin <pespin@sysmocom.de> Gerrit-Comment-Date: Thu, 19 Nov 2026 15:49:23 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin@sysmocom.de>