Attention is currently required from: fixeria, laforge.

neels has posted comments on this change by neels. ( 
https://gerrit.osmocom.org/c/pysim/+/41920?usp=email )

Change subject: saip SmspTpScAddr: safeguard against decoding error
......................................................................


Patch Set 4:

(1 comment)

Commit Message:

https://gerrit.osmocom.org/c/pysim/+/41920/comment/5ae98193_eee2de75?usp=email :
PS2, Line 13: The underlying issue, I presume, is that either the data needs
            : validation before decode_record_bin(), or decode_record_bin() 
needs
            : well-defined error handling.
> I'm not sure why raising an exception on a parsing error is not considered 
> well-defined?  Isn't that […]
Exactly.
We are here reading an example template from GSMA and get an exception.
This should by definition be correct content that we should not raise on.

In this instance it seems to me that our code is raising on a validly empty 
value, because AFAICT when it looks for padding with `if foo[-1] == 'f'` it 
fails to check for an empty foo first.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41920?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: Ic436e206776b81f24de126e8ee0ae8bf5f3e8d7a
Gerrit-Change-Number: 41920
Gerrit-PatchSet: 4
Gerrit-Owner: neels <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: laforge <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Comment-Date: Fri, 24 Apr 2026 22:20:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <[email protected]>

Reply via email to