Change in libosmocore[master]: fix osmo_mi_name_c() to always return talloced strings, via osmo_mi_n...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

neels gerrit-no-reply at lists.osmocom.org
Tue May 26 20:31:00 UTC 2020


neels has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmocore/+/18490 )

Change subject: fix osmo_mi_name_c() to always return talloced strings, via osmo_mi_name_buf()
......................................................................

fix osmo_mi_name_c() to always return talloced strings, via osmo_mi_name_buf()

Fix osmo_mi_name_buf() to snprintf() into the buf in *all* cases.

osmo_mi_name_c() is implemented via osmo_mi_name_buf(), which returns
compile-time string constants in special cases. That means that
osmo_mi_name_c() does return non-allocated strings in these special cases.
The caller of functions like osmo_mi_name_c() must always be able to rely on
getting a talloced string, or run a danger of deallocating const pointers.

Change-Id: I623959f01b72642bcdd18508097c5c405c59f6f1
---
M src/gsm/gsm48.c
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/90/18490/2
-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/18490
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I623959f01b72642bcdd18508097c5c405c59f6f1
Gerrit-Change-Number: 18490
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-CC: Jenkins Builder
Gerrit-MessageType: newpatchset
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200526/685e2fd9/attachment.htm>


More information about the gerrit-log mailing list