osmo-msc/openbsc/src
Jacob Erlbeck 7ffa7b095f nitb: Fix IMSI/IMEI buffer handling (Coverity)
Currently the handling of the buffers is not done consistently. Some
code assumes that the whole buffer may be used to store the string
while at other places, the last buffer byte is left untouched in the
assumption that it contains a terminating NUL-character. The latter
is the correct behaviour.

This commit changes to code to not touch the last byte in the buffers
and to rely on the last byte being NUL. So the maximum IMSI/IMEI
length is GSM_IMSI_LENGTH-1/GSM_IMEI_LENGTH-1.

For information: We assume that we allocate the structure with
talloc_zero. This means we have NULed the entire imsi array and then
only write sizeof - 1 characters to it. So the last byte remains NUL.

Fixes: Coverity CID 1206568, 1206567
Sponsored-by: On-Waves ehf
2015-04-10 08:47:00 +02:00
..
gprs gprs: Fix GSUP cancel_type handling (Coverity) 2015-04-07 20:13:43 +02:00
ipaccess adopt recent IPA related symbol rename 2014-08-20 23:47:56 +02:00
libbsc bts: "Repair" broken channels if we receive the release ack 2015-04-04 19:58:50 +02:00
libcommon nitb: Fix IMSI/IMEI buffer handling (Coverity) 2015-04-10 08:47:00 +02:00
libgb Makefile.am: Use AM_CPPFLAGS 2013-06-12 09:16:27 +02:00
libmgcp libmgcp: Fail if transcoding can't be configured 2015-03-29 11:46:45 +02:00
libmsc nitb: Fix IMSI/IMEI buffer handling (Coverity) 2015-04-10 08:47:00 +02:00
libtrau rtp: Fixed problem of mute audio on some calls 2015-03-28 17:56:16 +01:00
osmo-bsc bsc: Change paging strategy based on override or not 2015-04-01 19:26:26 +02:00
osmo-bsc_mgcp logging: Only compare the subscr address 2015-01-02 11:43:06 +01:00
osmo-bsc_nat nitb: Fix IMSI/IMEI buffer handling (Coverity) 2015-04-10 08:47:00 +02:00
osmo-nitb Fix most compiler warnings with gcc-4.9.2 2015-01-01 12:32:03 +01:00
utils write_queue: Check the result of osmo_wqueue_enqueue and free 2015-03-28 18:13:37 +01:00
Makefile.am move libctrl from openbsc to libosmoctrl (libosmocore.git) 2014-08-21 15:34:28 +02:00