From ad47659fd6d476f7d3e0fc214308ac3f985bfee1 Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 14 Jan 2020 19:46:02 +0100 Subject: [PATCH] The CD-ROM image backed code no longer returns the pointer of a stack variable. --- src/cdrom/cdrom_image_backend.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cdrom/cdrom_image_backend.c b/src/cdrom/cdrom_image_backend.c index 1cb210825..437c94a87 100644 --- a/src/cdrom/cdrom_image_backend.c +++ b/src/cdrom/cdrom_image_backend.c @@ -47,6 +47,9 @@ #define CROSS_LEN 512 +static char temp_keyword[1024]; + + #ifdef ENABLE_CDROM_IMAGE_BACKEND_LOG int cdrom_image_backend_do_log = ENABLE_CDROM_IMAGE_BACKEND_LOG; @@ -622,12 +625,11 @@ cdi_cue_get_buffer(char *str, char **line, int up) static int cdi_cue_get_keyword(char **dest, char **line) { - char temp[1024]; int success; - success = cdi_cue_get_buffer(temp, line, 1); + success = cdi_cue_get_buffer(temp_keyword, line, 1); if (success) - *dest = temp; + *dest = temp_keyword; return success; }