diff --git a/src/add-ons/kernel/file_systems/cdda/cdda.cpp b/src/add-ons/kernel/file_systems/cdda/cdda.cpp index 3716cad2de..30be6e4f20 100644 --- a/src/add-ons/kernel/file_systems/cdda/cdda.cpp +++ b/src/add-ons/kernel/file_systems/cdda/cdda.cpp @@ -562,6 +562,14 @@ read_cdtext(int fd, struct cdtext &cdtext) free(buffer); + if (cdtext.artist == NULL || cdtext.album == NULL) + return B_ERROR; + + for (int i = 0; i < cdtext.track_count; i++) { + if (cdtext.titles[i] == NULL) + return B_ERROR; + } + sanitize_string(cdtext.artist); sanitize_album(cdtext); sanitize_titles(cdtext);