libosmocore/src/gb
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
..
Makefile.am remove our internal copy of talloc, use system libtalloc 2015-12-05 23:38:18 +01:00
common_vty.c Change license of libosmogb from AGPLv3+ to GPLv2+ 2014-10-26 20:50:19 +01:00
common_vty.h libosmogb: move files to proper location and fix build 2012-06-17 23:05:26 +08:00
gprs_bssgp.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
gprs_bssgp_bss.c bssgp_rx_paging(): Fix parsing of P-TMSI IE in Paging message 2016-11-11 14:49:31 +00:00
gprs_bssgp_util.c Add helper function to convert numerical BSSGP PDU type to string 2016-03-11 22:29:39 +07:00
gprs_bssgp_vty.c bssgp_vty: Remove dead code and compiler warning 2016-11-11 15:24:29 +01:00
gprs_ns.c add osmo_gettimeofday as a shim around gettimeofday 2016-09-22 07:18:39 +02:00
gprs_ns_frgre.c Change license of libosmogb from AGPLv3+ to GPLv2+ 2014-10-26 20:50:19 +01:00
gprs_ns_vty.c ns: Add statistics for some events 2015-10-28 23:51:24 +01:00
libosmogb.map gb: Add bssgp_pdu_str to libosmogb namespace 2016-04-12 10:08:20 -04:00