summaryrefslogtreecommitdiff
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-2eeb338e906d0873c6d5386adfbaf82348edd04c.tar.gz
rockbox-2eeb338e906d0873c6d5386adfbaf82348edd04c.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)
361 int action; 361 int action;
362 bool done = false; 362 bool done = false;
363 char title[MAX_PATH]; 363 char title[MAX_PATH];
364 int len;
365
364 struct cuesheet_file cue_file; 366 struct cuesheet_file cue_file;
365 struct mp3entry *id3 = audio_current_track(); 367 struct mp3entry *id3 = audio_current_track();
366 368
367 snprintf(title, MAX_PATH, "%s: %s", cue->performer, cue->title); 369 len = snprintf(title, sizeof(title), "%s: %s", cue->performer, cue->title);
370
371 if ((unsigned) len > sizeof(title))
372 DEBUGF("browse_cuesheet title truncated\n");
373
368 gui_synclist_init(&lists, list_get_name_cb, cue, false, 2, NULL); 374 gui_synclist_init(&lists, list_get_name_cb, cue, false, 2, NULL);
369 gui_synclist_set_nb_items(&lists, 2*cue->track_count); 375 gui_synclist_set_nb_items(&lists, 2*cue->track_count);
370 gui_synclist_set_title(&lists, title, 0); 376 gui_synclist_set_title(&lists, title, 0);