dexter submitted this change.
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 left-pad the data with zeros if it does not
fit the specified length. This is a problem with IMSIs shorter than 17
characters, because the left padded zeros would appear like a
null-string to the receiving end.
When the ALIGN(left) modifier is removed, the encoder will apply the
padding from the right. This will fill the unused space after the string
with zeros.
Related: OS#5927
Change-Id: I011eb2496b1422c49736b227dfa1e2a2d6096d67
---
M library/PCUIF_Types.ttcn
1 file changed, 22 insertions(+), 2 deletions(-)
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 {
To view, visit change 33417. To unsubscribe, or for help writing mail filters, visit settings.