From 1317771c9340a9fdc86911206cdc8719a3d2bfe6 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 20 Jan 2019 13:41:26 +0100 Subject: gsm0408_test: Fix IMEI-SV related tests to use no more than 16 digits The IMEI-SV is speified as a 16 digit number: 14 digits of IMEI plus two digits of software version. Let's not try to feed 18 digit long numbers into our functions, as the resulting behavior is unspecified. Change-Id: I6fb85a0516dc387902ad9de4fe8c1ba82d68cae6 --- tests/gsm0408/gsm0408_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/gsm0408/gsm0408_test.c') diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 6902e8e2..2d60b845 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -422,17 +422,17 @@ static const struct test_mid_encode_decode_test test_mid_encode_decode_tests[] = }, { .mi_type = GSM_MI_TYPE_IMEISV, - .mi_str = "987654321098765432", - .mi_name = "IMEI-SV-987654321098765432", - .expect_mi_tlv_hex = "170a937856341290785634f2", + .mi_str = "9876543210987654", + .mi_name = "IMEI-SV-9876543210987654", + .expect_mi_tlv_hex = "17099378563412907856f4", }, { .mi_type = GSM_MI_TYPE_IMEISV, - .mi_str = "987654321098765432", - .mi_name = "IMEI-SV-987654321098765432", - .expect_mi_tlv_hex = "170a937856341290785634f2", - .str_size = 16, - .expect_str = "987654321098765", + .mi_str = "9876543210987654", + .mi_name = "IMEI-SV-9876543210987654", + .expect_mi_tlv_hex = "17099378563412907856f4", + .str_size = 17, + .expect_str = "9876543210987654", }, { /* gsm48 treats TMSI as decimal string */ -- cgit v1.2.3