Attention is currently required from: dexter.
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/pysim/+/28185 )

Change subject: ts_102_221: The BTLV IEs FILE SIZE and TOTAL FILE SIZE have a 
min length
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

File pySim/construct.py:

https://gerrit.osmocom.org/c/pysim/+/28185/comment/9bf39c23_9cd317b8
PS1, Line 244: length = length + (self.minlen - length)
This looks weird to me, because 'length' would always be equal to 'self.minlen':

  test(len=0, min=10) == 0 + (10 - 0) == 10
  test(len=1, min=10) == 1 + (10 - 1) == 10
  test(len=5, min=10) == 5 + (10 - 5) == 10
  test(len=7, min=10) == 7 + (10 - 7) == 10
  test(len=9, min=10) == 9 + (10 - 9) == 10

If you want to ensure a minimum value, just do:

  length = min(self.__bytes_required(obj), self.minlen)



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/28185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ief113ce8fe3bcae2c9fb2ff4138df9ccf98d26ff
Gerrit-Change-Number: 28185
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Thu, 26 May 2022 19:39:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Reply via email to