[openggsn] [PATCH 1/2] Fix possible buffer overflow for gsn_restart file path

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/OpenBSC@lists.osmocom.org/.

Holger Freyther holger at freyther.de
Thu Aug 18 08:42:04 UTC 2016


> On 18 Aug 2016, at 04:06, Neels Hofmeyr <nhofmeyr at sysmocom.de> wrote:
> 
> For strncat, to obtain n, one must not subtract the length of what is appended,
> but the length of what is already written from the buffer size.
> 

let's use talloc_asprintf or the append variant of it. The place doesn't look like performance critical code.

holger




More information about the OpenBSC mailing list