From: Josh Coalson Date: Thu, 21 Nov 2002 06:41:46 +0000 (+0000) Subject: more checks in the cuesheet validator X-Git-Tag: 1.2.0~1309 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f86cc741815c601ab44e31e0349a9528adbbf00;p=platform%2Fupstream%2Fflac.git more checks in the cuesheet validator --- diff --git a/src/libFLAC/format.c b/src/libFLAC/format.c index 81d00e7..6283979 100644 --- a/src/libFLAC/format.c +++ b/src/libFLAC/format.c @@ -277,14 +277,16 @@ FLAC_API FLAC__bool FLAC__format_cuesheet_is_legal(const FLAC__StreamMetadata_Cu return false; } - if(cue_sheet->tracks[i].num_indices == 0) { - if(violation) *violation = "cue sheet track must have at least one index point"; - return false; - } + if(i < cue_sheet->num_tracks - 1) { + if(cue_sheet->tracks[i].num_indices == 0) { + if(violation) *violation = "cue sheet track must have at least one index point"; + return false; + } - if(cue_sheet->tracks[i].indices[0].number > 1) { - if(violation) *violation = "cue sheet track's first index number must be 0 or 1"; - return false; + if(cue_sheet->tracks[i].indices[0].number > 1) { + if(violation) *violation = "cue sheet track's first index number must be 0 or 1"; + return false; + } } for(j = 0; j < cue_sheet->tracks[i].num_indices; j++) {