:: Re: [DNG] Nasty Linux systemd secur…
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: aitor
Ημερομηνία:  
Προς: dng
Αντικείμενο: Re: [DNG] Nasty Linux systemd security bug revealed
Hi,

On 31/7/21 3:02, Bruce Perens via Dng wrote:
> If you want this, it's easy enough to allocate your own stack, and
> write functions that allocate from it and release the allocation.


Sometimes I use the following buffer struct for dynamic allocation:

https://gitea.devuan.dev/aitor_czr/libnetaid/src/branch/master/backend_src/sbuf.c
<https://gitea.devuan.dev/aitor_czr/libnetaid/src/branch/master/backend_src/sbuf.c>

A tiny version of the one developed by Johan Malm (bunsenlabs):

https://github.com/johanmalm/jgmenu/blob/master/src/sbuf.c
<https://github.com/johanmalm/jgmenu/blob/master/src/sbuf.c>

I added a variadic function enabling the concatenation of several strings:

sbuf_concat(&buffer, N, string1, string2, ..., stringN);

Cheers,

Aitor.