diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-02-22 15:14:01 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2016-02-22 15:14:01 +0100 |
commit | f3f1bde4fcabf20d00b60de934e1c1e07ab0b16c (patch) | |
tree | 5f1f350bb9e643be4ad2e810f10657bdc62daa7e /tests | |
parent | 528ff3910f6f4455c6aee9794e05bd7d54bcc01f (diff) |
alloc: Fix UBSAN for accessing the array at -16
This test will check that we exhaust the available TFIs, so the last
TFI is -16 and then we try to store to that address. It is surprising
that it worked!
Diffstat (limited to 'tests')
-rw-r--r-- | tests/alloc/AllocTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index c3efd4d9..b636b6e4 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -150,9 +150,9 @@ static void test_alloc_a(gprs_rlcmac_tbf_direction dir, if (tbfs[i]) tbf_free(tbfs[i]); - tbfs[tfi] = tbf_alloc(bts, NULL, dir, -1, 0, 0, 0); - OSMO_ASSERT(tbfs[tfi]); - tbf_free(tbfs[tfi]); + tbfs[0] = tbf_alloc(bts, NULL, dir, -1, 0, 0, 0); + OSMO_ASSERT(tbfs[0]); + tbf_free(tbfs[0]); } static void test_alloc_a() |