dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/33417 )
Change subject: PCUIF_Types: fix record PCUIF_pch_dt ......................................................................
PCUIF_Types: fix record PCUIF_pch_dt
The record PCUIF_pch_dt uses ALIGN(left) variants for imsi data. This is not correct, since it would pad the data with zeros if it does not fit the specified length. This is unwanted in particular in the case of the IMSI since the struct also allows for IMSIs shorter than 17 characters as long as the minimum lenght is 3.
Related: OS#5927 Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67 --- M library/PCUIF_Types.ttcn 1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/17/33417/1
diff --git a/library/PCUIF_Types.ttcn b/library/PCUIF_Types.ttcn index 5ddcc9e..8f5d4eb 100644 --- a/library/PCUIF_Types.ttcn +++ b/library/PCUIF_Types.ttcn @@ -320,8 +320,8 @@ octetstring data length(23) } with { variant (tlli) "BYTEORDER(last)" - variant (imsi) "FIELDLENGTH(17), ALIGN(left)" - variant (data) "FIELDLENGTH(23), ALIGN(left)" + variant (imsi) "FIELDLENGTH(17)" + variant (data) "FIELDLENGTH(23)" };
type union PCUIF_MsgUnion {