From: Ramakrishnan Muthukrishnan Date: Sat, 4 Nov 2023 17:48:16 +0000 (+0530) Subject: bugfix: allocate memory before copying the device name X-Git-Url: https://git.rkrishnan.org/Site/Content/Exhibitors/nxhtml.html?a=commitdiff_plain;h=1ba053070465e2483ef08fba8229493bd59d945c;p=pihpsdr.git bugfix: allocate memory before copying the device name --- diff --git a/rx_menu.c b/rx_menu.c index 14bdc74..938f313 100644 --- a/rx_menu.c +++ b/rx_menu.c @@ -202,6 +202,7 @@ void toggle_audio_output_device(void) { } char *new_output_device_name = output_devices[out_index].name; + active_receiver->audio_name = g_new(gchar, strlen(new_output_device_name) + 1); strcpy(active_receiver->audio_name, new_output_device_name); // set the other device as active