summaryrefslogtreecommitdiff
path: root/apps/cuesheet.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/cuesheet.c')
-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);