libosmocore/src
Harald Welte 6176b6e092 bssgp_rx_paging(): Fix parsing of P-TMSI IE in Paging message
This was actually discovered by the following compiler warning in
gcc-6.2.0:

  CC       gprs_bssgp_bss.lo
gprs_bssgp_bss.c: In function ‘bssgp_rx_paging’:
gprs_bssgp_bss.c:544:2: warning: this ‘if’ clause does not guard...
[-Wmisleading-indentation]
  if (TLVP_PRESENT(&tp, BSSGP_IE_TMSI) &&
  ^~
gprs_bssgp_bss.c:548:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
   *(pinfo->ptmsi) = ntohl(*(uint32_t *)
   ^

This is an actual bug.  If we recevied a BSSGP Paging Request without
P-TMSI, we might crash or report some random memory as P-TMSI to the
caller in the output data structure.

Change-Id: Ib4f307827cd7cccc91c1415a6fb5428d7cf8416d
2016-11-11 14:49:31 +00:00
..
codec Add null-pointer check to osmo_amr_rtp_dec() 2016-11-07 15:19:47 +01:00
ctrl Add function to send TRAP over Control Interface 2016-10-12 11:37:49 +00:00
gb bssgp_rx_paging(): Fix parsing of P-TMSI IE in Paging message 2016-11-11 14:49:31 +00:00
gsm gan: Mark gan_pdisc_vals[] as public / non-static symbol 2016-11-11 14:49:14 +00:00
sim misc: Some spelling errors corrected 2016-05-25 19:43:56 +00:00
vty vty/show asciidoc: counters: improve table headers 2016-10-18 12:19:13 +02:00
Makefile.am add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
application.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
backtrace.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
bitcomp.c bitcomp: Remove the t4 decoding from libosmocore 2016-11-10 17:07:45 +00:00
bits.c Add octet-aligned/unaligned shift functions 2016-06-20 19:02:56 +02:00
bitvec.c bitvec: Force inlining of bitvec_set_bit_pos/bitvec_set_bit 2016-07-16 21:02:41 +00:00
conv.c misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
crc16.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
crcXXgen.c.tpl misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
fsm.c Add logging and testing for FSM deallocation 2016-11-08 19:35:19 +00:00
gsmtap_util.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
logging.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
logging_syslog.c doc: Fix the Doxygen section endings 2012-04-18 21:53:23 +02:00
loggingrb.c sttrb / loggingrb: Use GPLv2+ as license, not AGPLv3+ 2014-10-26 20:52:25 +01:00
macaddr.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
msgb.c msgb: add msgb_talloc_ctx_init(), deprecate msgb_set_talloc_ctx() 2016-09-27 11:46:38 +02:00
msgfile.c msgfile: Fix warning on BSDs stdio 2015-03-18 21:54:37 +01:00
panic.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
plugin.c add some missing doxygen annotation for libosmocore functions 2013-01-11 09:43:32 +01:00
prim.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rate_ctr.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
rbtree.c fix FSF address in sources/headers 2015-11-12 13:46:05 +01:00
select.c osmo_select_main(): drop useless call to osmo_timers_check() 2016-09-28 10:48:46 +00:00
serial.c misc: Doxygen tweaks: fixed some typos and minor errors 2013-02-15 13:27:59 +01:00
signal.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00
socket.c fix printf format for commit 'osmo_sock_init(): include host and port in error messages' 2016-08-29 11:22:39 +02:00
stat_item.c stats: Add OSMO prefix to STAT_ITEM_NOVALUE_ID 2015-12-08 10:33:15 +01:00
statistics.c core: Add difference function to osmo_counter 2015-10-29 01:10:06 +01:00
stats.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
stats_statsd.c statsd: Fix compiler warning (int32_t vs. int64_t) 2016-11-11 15:24:24 +01:00
strrb.c strrb.c: Use string.h, not strings.h 2014-11-14 15:21:18 +01:00
timer.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
timer_gettimeofday.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
utils.c add get_value_string_or_null() to handle unknown items 2016-06-13 17:46:20 +00:00
write_queue.c Update doxygen annotations in libosmocore 2016-05-05 18:49:27 +02:00