Attention is currently required from: biocape, dexter. fixeria has posted comments on this change by biocape. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/43371?usp=email )
Change subject: Add GSM 7-bit packing and Network Name IE support ...................................................................... Patch Set 1: Code-Review+1 (1 comment) File src/osmocom/utils.py: https://gerrit.osmocom.org/c/python/pyosmocom/+/43371/comment/cbd43c9e_754f6b6e?usp=email : PS1, Line 121: int.from_bytes(packed, byteorder='little') I like the approach, but there is a problem here: `int.from_bytes()` with `byteorder='little'` will drop any trailing 0x00 bytes in the stream. It's probably safe for the Network Name IE, but this function may also be used for general GSM 7-bit unpacking where data can end in zeros (like SMS text). You can append a dummy byte before converting to prevent bit-shifting into empty padding: ```suggestion packed_int = int.from_bytes(packed + b'\x01', byteorder='little') ``` -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/43371?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: I4661352e39031dc0041fc7851f675d6083a1035f Gerrit-Change-Number: 43371 Gerrit-PatchSet: 1 Gerrit-Owner: biocape <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <[email protected]> Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: laforge <[email protected]> Gerrit-Attention: biocape <[email protected]> Gerrit-Attention: dexter <[email protected]> Gerrit-Comment-Date: Tue, 25 Aug 2026 10:02:08 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes
