diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-09-23 11:10:21 -0400 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2023-09-23 11:19:59 -0400 |
commit | 62db16c82c27e2ca6895b6c50fdc9d3b30be4702 (patch) | |
tree | 4897a7bb55f736bd10cf926afdfa17426c12c15b | |
parent | fcc82dfdca470e49d864da9af4fa9573ad6e54fe (diff) | |
download | rockbox-62db16c82c.tar.gz rockbox-62db16c82c.zip |
[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
-rw-r--r-- | apps/bookmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |