Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/35424?usp=email
to look at the new patch set (#7).
Change subject: ts_31_103: Add construct for EF.GBABP and EF.GBANL
......................................................................
ts_31_103: Add construct for EF.GBABP and EF.GBANL
Change-Id: Ife06f54c2443f3e048bd36f706f309843703403a
---
M pySim/ts_31_103.py
M pysim-testdata/pySim-trace_test_gsmtap.pcapng.ok
2 files changed, 22 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/35424/7
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35424?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ife06f54c2443f3e048bd36f706f309843703403a
Gerrit-Change-Number: 35424
Gerrit-PatchSet: 7
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
Attention is currently required from: fixeria, laforge.
Hello Jenkins Builder, fixeria,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/35424?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed:
Code-Review+2 by fixeria, Verified-1 by Jenkins Builder
Change subject: ts_31_103: Add construct for EF.GBABP and EF.GBANL
......................................................................
ts_31_103: Add construct for EF.GBABP and EF.GBANL
Change-Id: Ife06f54c2443f3e048bd36f706f309843703403a
---
M pySim/ts_31_103.py
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/24/35424/6
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35424?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ife06f54c2443f3e048bd36f706f309843703403a
Gerrit-Change-Number: 35424
Gerrit-PatchSet: 6
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/35487?usp=email )
Change subject: construct: avoid StreamError exceptions due to files containing all-ff
......................................................................
construct: avoid StreamError exceptions due to files containing all-ff
In smart cards, files/records containing all-ff means they are simply
not used/initialized. Let's avoid raising exceptions when interpreting
0xff as length value and reading less bytes as value.
Change-Id: I09c3cb82063fc094eb047749996a6eceff757ea2
---
M pySim/construct.py
1 file changed, 23 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/87/35487/1
diff --git a/pySim/construct.py b/pySim/construct.py
index 1ed3576..0c82c41 100644
--- a/pySim/construct.py
+++ b/pySim/construct.py
@@ -402,7 +402,16 @@
"""Helper function to wrap around normalize_construct() and filter_dict()."""
if not length:
length = len(raw_bin_data)
- parsed = c.parse(raw_bin_data, total_len=length, **context)
+ try:
+ parsed = c.parse(raw_bin_data, total_len=length, **context)
+ except StreamError as e:
+ # if the input is all-ff, this means the content is undefined. Let's avoid passing StreamError
+ # exceptions in those situations (which might occur if a length field 0xff is 255 but then there's
+ # actually less bytes in the remainder of the file.
+ if all([v == 0xff for v in raw_bin_data]):
+ return None
+ else:
+ raise e
return normalize_construct(parsed)
def build_construct(c, decoded_data, context: dict = {}):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/35487?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I09c3cb82063fc094eb047749996a6eceff757ea2
Gerrit-Change-Number: 35487
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange