From 62db16c82c27e2ca6895b6c50fdc9d3b30be4702 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 23 Sep 2023 11:10:21 -0400 Subject: [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 --- apps/bookmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/bookmark.c b/apps/bookmark.c index 68c10b36e7..0b468bdb76 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c @@ -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 { -- cgit v1.2.3