Attention is currently required from: dexter, laforge. hampushellsberg has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/pysim/+/43984?usp=email )
Change subject: esim.saip: derive nb_rec from efFileSize when the descriptor omits it ...................................................................... Patch Set 4: (1 comment) File pySim/esim/saip/__init__.py: https://gerrit.osmocom.org/c/pysim/+/43984/comment/56c2acf5_6e825dcd?usp=email : PS3, Line 369: if self.rec_len and not fd_dec['num_of_rec']: > To me this looks equivalent. […] The difference is a file that comes from a template: File.__init__ calls from_template() before from_fileDescriptor(), and from_template() copies the template's nb_rec, so nb_rec is no longer None when the descriptor is decoded. For such a file with a fileDescriptor that has a record length but no count, and a larger efFileSize, the old check kept the template's count. In the repro, EF.MSISDN (template: 1 record) with record length 34 and efFileSize 68 decodes as 1 record of 34 bytes before and 2 records, 68 bytes, with the patch. Without a template you're right, both behave the same. Should the comment say that from_template() has set nb_rec already? -- To view, visit https://gerrit.osmocom.org/c/pysim/+/43984?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I191b234446c278a5252a903d170c3336d9e0c1ba Gerrit-Change-Number: 43984 Gerrit-PatchSet: 4 Gerrit-Owner: laforge <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <[email protected]> Gerrit-Reviewer: laforge <[email protected]> Gerrit-CC: hampushellsberg <[email protected]> Gerrit-Attention: laforge <[email protected]> Gerrit-Attention: dexter <[email protected]> Gerrit-Comment-Date: Mon, 02 Nov 2026 21:01:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter <[email protected]>
