Re: [PATCH 1/2] audio/jackaudio: Avoid dynamic stack allocation in qjack_client_init

2023-08-21 Thread Peter Maydell
On Mon, 21 Aug 2023 at 09:01, Christian Schoenebeck wrote: > > On Friday, August 18, 2023 5:58:45 PM CEST Peter Maydell wrote: > > Avoid a dynamic stack allocation in qjack_client_init(), by using > > a g_autofree heap allocation instead. > > > > (We stick with allocate + snprintf() because the JA

Re: [PATCH 1/2] audio/jackaudio: Avoid dynamic stack allocation in qjack_client_init

2023-08-21 Thread Christian Schoenebeck
On Friday, August 18, 2023 5:58:45 PM CEST Peter Maydell wrote: > Avoid a dynamic stack allocation in qjack_client_init(), by using > a g_autofree heap allocation instead. > > (We stick with allocate + snprintf() because the JACK API requires > the name to be no more than its maximum size, so g_st

Re: [PATCH 1/2] audio/jackaudio: Avoid dynamic stack allocation in qjack_client_init

2023-08-21 Thread Francisco Iglesias
On [2023 Aug 18] Fri 16:58:45, Peter Maydell wrote: > Avoid a dynamic stack allocation in qjack_client_init(), by using > a g_autofree heap allocation instead. > > (We stick with allocate + snprintf() because the JACK API requires > the name to be no more than its maximum size, so g_strdup_printf(

[PATCH 1/2] audio/jackaudio: Avoid dynamic stack allocation in qjack_client_init

2023-08-18 Thread Peter Maydell
Avoid a dynamic stack allocation in qjack_client_init(), by using a g_autofree heap allocation instead. (We stick with allocate + snprintf() because the JACK API requires the name to be no more than its maximum size, so g_strdup_printf() would require an extra truncation step.) The codebase has v