diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-22 21:17:49 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-05-22 21:17:49 +0200 |
commit | 7996134d2afb8098eb750433b20185bde21e0023 (patch) | |
tree | 3780e6ec6ef626f3920bb5fade64d2b0475ca7e2 /tests/misc/Makefile.am | |
parent | ac26607fe4644e0794b4637048bd58e4c978260c (diff) |
common: Ignore "si.valid" outside of _MAX_SYSINFO_TYPE
Limit the range from 0 to (_MAX_SYSINFO_TYPE - 1) instead of
0 to 31. This way we will never access the lchan->si.buf[] out
of bounds. This is only a theoretical issue though as the code
filling the lchan->si.buf for the SACCH will not have valid
>= _MAX_SYSINFO_TYPE. Add a small regression test to check we
still schedule all SIs.
Fixes: CID 1040765
Diffstat (limited to 'tests/misc/Makefile.am')
-rw-r--r-- | tests/misc/Makefile.am | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/misc/Makefile.am b/tests/misc/Makefile.am new file mode 100644 index 00000000..4091bc6a --- /dev/null +++ b/tests/misc/Makefile.am @@ -0,0 +1,8 @@ +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR) +AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOGSM_CFLAGS) +LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOGSM_LIBS) +noinst_PROGRAMS = misc_test +EXTRA_DIST = misc_test.ok + +misc_test_SOURCES = misc_test.c $(srcdir)/../stubs.c +misc_test_LDADD = $(top_builddir)/src/common/libbts.a $(LDADD) |