summaryrefslogtreecommitdiffstats
path: root/tests/gsm0408/gsm0408_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gsm0408/gsm0408_test.c')
-rw-r--r--tests/gsm0408/gsm0408_test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c
index b5f80614..db1d45ad 100644
--- a/tests/gsm0408/gsm0408_test.c
+++ b/tests/gsm0408/gsm0408_test.c
@@ -727,6 +727,17 @@ static const struct bcd_number_test {
.dec_ascii = "(none)",
.dec_rc = -EIO,
},
+ {
+ .test_name = "decoding buffer is one byte too small (OS#4049)",
+
+ /* Decoding test */
+ .dec_hex = "022143", /* "1234" */
+ .dec_ascii = "123", /* '4' was truncated */
+ .dec_rc = -ENOSPC,
+
+ /* Buffer length limitations */
+ .dec_buf_lim = 4,
+ },
};
static void test_bcd_number_encode_decode()