소스 검색

fix handling of cuesheets with 99 tracks (Debian #658818)

There's an off-by-one error in cd.c which causes cueprint to wrongly reject
 cuesheets with 99 tracks.  Its actual limit is 98 tracks, and yet as the
 source code notes, the Red Book audio standard permits 99 tracks per disc
 (and 99 indices per track).
 .
 When I looked into this, I saw that:
 .
 1) not only will the same error occur with index numbers, but
 2) the wrong preprocessor symbol is being expanded when checking the index number

Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658818
From: Branden Robinson <branden@debian.org>
Author: Dmitry Smirnov <onlyjob@member.fsf.org>
master
Dmitry Smirnov 11 년 전
부모
커밋
e74f095fe1
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. +2
    -2
      src/lib/cd.c

+ 2
- 2
src/lib/cd.c 파일 보기

@@ -126,7 +126,7 @@ Cdtext *cd_get_cdtext(Cd *cd)

Track *cd_add_track(Cd *cd)
{
if (MAXTRACK - 1 > cd->ntrack) {
if (MAXTRACK > cd->ntrack) {
cd->ntrack++;
} else {
fprintf(stderr, "too many tracks\n");
@@ -266,7 +266,7 @@ Cdtext *track_get_cdtext(Track *track)

void track_add_index(Track *track, long index)
{
if (MAXTRACK - 1 > track->nindex) {
if (MAXINDEX > track->nindex) {
track->nindex++;
} else {
fprintf(stderr, "too many indexes\n");


불러오는 중...
취소
저장