[BugFix] bookmark.c root_dir bookmark

in some calls to generate_bookmark_file_name()

len gets specified in order to not NULL terminate the buffer string
unfortunately, I missed the root_dir case in g#4839

Change-Id: I24d1360bbe72e6a1b2ed3332ff5854d039d58ca5
This commit is contained in:
William Wilgus 2023-09-23 11:10:21 -04:00
parent fcc82dfdca
commit 62db16c82c

View file

@ -380,7 +380,7 @@ static bool generate_bookmark_file_name(char *filenamebuf,
{
/* if this is a root dir MP3, rename the bookmark file root_dir.bmark */
/* otherwise, name it based on the bmarknamein variable */
if (!strcmp("/", bmarknamein))
if (!strncmp("/", bmarknamein, bmarknamelen))
strmemccpy(filenamebuf, "/root_dir.bmark", filenamebufsz);
else
{