gbprox_rx_ptp_from_bss: fix dangling pointer

Building with gcc (Debian 12.2.0-14) 12.2.0 and --enable-werror fails
without this during "make distcheck":

../../../src/gb_proxy.c:450:24: error: storing the address of local variable 'tp' in '((struct libgb_msgb_cb *)msg)[2].bssgp_cell_id' [-Werror=dangling-pointer=]
  450 |         msgb_bcid(msg) = (void *)&tp;

This means that gcc now warns (and we turn that into an error) if one
assigns the address of a local (stack) variable to something allocated
on the heap, and doesn't remove that reference before ending the function
(invalidating the stack).

Related: OS#6057
Change-Id: Ie51e37572993cb5dc24ecf13bc300225f09cb744
1 file changed
tree: 89012152a8ef01d4ba088e41cc70123dbe18776e
  1. contrib/
  2. debian/
  3. doc/
  4. include/
  5. m4/
  6. src/
  7. tests/
  8. .gitignore
  9. .gitreview
  10. .mailmap
  11. AUTHORS
  12. configure.ac
  13. COPYING
  14. git-version-gen
  15. Makefile.am
  16. osmoappdesc.py
  17. README.md
  18. README.vty-tests
  19. TODO-RELEASE
README.md

About osmo-gbproxy

osmo-gbproxy is a proxy for the Gb interface within the 3GPP GERAN (GPRS/EDGE RAN) architecture. It is part of the Osmocom Open Source Mobile Communications projects.

It allows you to aggregate many Gb links/connections into one. It also has the ability to convert between different Gb interface protocol stacking, such as from Gb-over-FrameRelay to Gb-over-IP.

Until 2021 it used to be part of the osmo-sgsn git repository, and before that (until 2017) part of openbsc.git

Homepage and Issue Tracker

Find the issue tracker and wiki online at https://osmocom.org/projects/osmo-gbproxy and https://osmocom.org/projects/osmo-gbproxy/wiki, respectively.

Documentation

You can find the user manual at https://ftp.osmocom.org/docs/latest/osmogbproxy-usermanual.pdf and the VTY reference manual at https://ftp.osmocom.org/docs/latest/osmogbproxy-vty-reference.pdf.