summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-07-25 14:14:45 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2018-07-25 14:14:45 +0200
commit2eeb338e906d0873c6d5386adfbaf82348edd04c (patch)
tree5679c0d465c9f27d79dd6c5bee969e13168e181b
parentbdbc7f7b7b26fe7ec0dac6d58583e3086b7f7f5c (diff)
downloadrockbox-2eeb338.tar.gz
rockbox-2eeb338.zip
Ignore cuesheet title truncation
Change-Id: I0de8a1468379f60140fb30b6c086fe15ea753da2
-rw-r--r--apps/cuesheet.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c
index 52b8c5703b..708c6763b1 100644
--- a/apps/cuesheet.c
+++ b/apps/cuesheet.c
@@ -361,10 +361,16 @@ void browse_cuesheet(struct cuesheet *cue)
int action;
bool done = false;
char title[MAX_PATH];
+ int len;
+
struct cuesheet_file cue_file;
struct mp3entry *id3 = audio_current_track();
- snprintf(title, MAX_PATH, "%s: %s", cue->performer, cue->title);
+ len = snprintf(title, sizeof(title), "%s: %s", cue->performer, cue->title);
+
+ if ((unsigned) len > sizeof(title))
+ DEBUGF("browse_cuesheet title truncated\n");
+
gui_synclist_init(&lists, list_get_name_cb, cue, false, 2, NULL);
gui_synclist_set_nb_items(&lists, 2*cue->track_count);
gui_synclist_set_title(&lists, title, 0);