From e4799f56030a1dc73c9ebf0092084dfaa332398d Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sun, 26 May 2019 00:55:20 +0700 Subject: gsm48_decode_bcd_number2(): return -EINVAL if LV has too big length Change-Id: Ie07b2e8bc2f9628904e88448b4ee63b359655123 --- tests/gsm0408/gsm0408_test.c | 2 +- tests/gsm0408/gsm0408_test.ok | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c index 55c9b619..d7bae775 100644 --- a/tests/gsm0408/gsm0408_test.c +++ b/tests/gsm0408/gsm0408_test.c @@ -712,7 +712,7 @@ static const struct bcd_number_test { .test_name = "LV incorrect length", .dec_hex = "05214365", /* should be 0x03 */ .dec_ascii = "(none)", - .dec_rc = -EIO, + .dec_rc = -EINVAL, }, { .test_name = "empty input buffer", diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok index b0804116..075886ec 100644 --- a/tests/gsm0408/gsm0408_test.ok +++ b/tests/gsm0408/gsm0408_test.ok @@ -177,8 +177,8 @@ BSD number encoding / decoding test - Actual: (rc=-28) '123456789012345' - Running test: LV incorrect length - Decoding HEX (buffer limit=0) '05214365'... - - Expected: (rc=-5) '(none)' - - Actual: (rc=-5) '(none)' + - Expected: (rc=-22) '(none)' + - Actual: (rc=-22) '(none)' - Running test: empty input buffer - Encoding ASCII (buffer limit=0) ''... - Expected: (rc=1) '00' -- cgit v1.2.3