libosmocore/src/gsm
Sylvain Munaut 71fd42fede gsm/gsm48_ie: Fix Range 256 format decoding
From the mail:

---
appended is another patch for fixing a bug in the calculation of the
frequency lists. This time the patch is for the "Range 256 format".
The problem is that the operand for the "smod" operation might be
negative, in this case the simplified version won't work as expected.

In the patch I introduced a separate function for "smod" which takes
care of the sign. I have not yet checked if the other formats are also
affected, this would be the case if the "smod" operand can be negative.

There might be other solutions to fix the problem without the need
for a separate function, however I have not thought further about it.

A test vector is the following frequency list ("Range 256 format",
first byte is the length):

 09 8b 1c 83 8c 15 ef 02 2d 30

The correct ARFCNs are

 569 571 576 578 586 608 712 715 719

The uncorrected version would instead return:

 444 457 460 464 569 576 578 586 608

This means four ARFCNs are wrong which will cause problems if for
example the frequency list contains the ARFCNs for hopping.
----

Written-by: Dieter Spaar <spaar@mirider.augusta.de>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-09-01 22:05:29 +02:00
..
Makefile.am tlv: Make tlv parser arrays 256 entries wide to prevent overflow on 0xff 2011-07-16 12:08:28 +02:00
a5.c gsm/a5: Add a A5 1&2 implementation 2011-04-26 14:40:49 +02:00
abis_nm.c doxygen: Add documentation for Abis OML 2011-08-17 19:15:24 +02:00
comp128.c This patch moves the GSM-specific functions to the new library 2011-03-23 18:08:08 +01:00
gprs_cipher_core.c gprs_cipher_core: Fix potential buffer overflows 2011-07-16 12:03:46 +02:00
gsm48.c add some utility functions for paging related calculation (TS 05.02) 2011-06-26 14:40:12 +02:00
gsm48_ie.c gsm/gsm48_ie: Fix Range 256 format decoding 2011-09-01 22:05:29 +02:00
gsm0480.c include: reorganize headers file to include/osmocom/[gsm|core] 2011-03-23 18:09:28 +01:00
gsm0502.c import gsm0502_calc_paging_group() from openbsc 2011-06-26 14:47:16 +02:00
gsm0808.c gsm 08.08: use ANSI function definition with (void) 2011-07-16 12:13:00 +02:00
gsm_utils.c doxygen: Add main page for all three libraries 2011-08-30 11:32:56 +02:00
lapdm.c doxygen: Add documentation for LAPDm code 2011-08-17 18:22:08 +02:00
rsl.c RSL: add doxygen documentation 2011-08-17 18:52:21 +02:00
rxlev_stat.c bitvec: add bitvec_find_first_bit_pos() from gsm/rxlev_stat.c 2011-03-28 20:00:45 +02:00
sysinfo.c sysinfo: add EXTENDED MEASUREMENT ORDER / MEASUREMENT INFO to SI types 2011-06-25 21:39:18 +02:00
tlv_parser.c doxygen: Add documentation about TLV parser 2011-08-17 17:50:55 +02:00