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=ema... : 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.