-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disc with bad TOC crashes CUERipper #236
Comments
@ToadKing Thanks for the report and linking to it from: The issue concerning the wrong Bwg.Scsi\TocEntry.cs:77 cuetools.net/Bwg.Scsi/TocEntry.cs Line 77 in f52b795
Bwg.Scsi\Result.cs:151 public uint Get32(int offset)
{
return (UInt32)((Get8(offset) << 24) | (Get8(offset + 1) << 16) | (Get8(offset + 2) << 8) | Get8(offset + 3));
} cuetools.net/Bwg.Scsi/Result.cs Line 151 in f52b795
Bwg.Scsi\Result.cs:107 public byte Get8(int offset)
{
if (offset >= m_size)
throw new Exception("offset " + offset.ToString() + " is out side the range of the buffer");
return Marshal.ReadByte(m_buffer, offset);
} cuetools.net/Bwg.Scsi/Result.cs Line 107 in f52b795
The assignment of the value for the |
In rare cases, the first track is reported to start at a frame lower than 150. This leads to an incorrect TOC entry. In such cases, the StartSector is assigned a wrong value of e.g. 16777141 (16777216 - 75). - Set StartSector to 0 in cases, where a value larger than (16777216 - 150) is reported. - Fixes gchudov#236 - See also: https://hydrogenaud.io/index.php/topic,125779.0.html
That build seems to work (CUERipper no longer crashes) but the first track definitely has some samples cut off from the start of the track. Not sure if that's something that can actually be read without overreading though. |
Got a CD with this bad TOC:
The first track seems to start at frame 75 (tool reports offsets from frame 150, and 16777141 is -75 as a two's compliment 24-bit number) which is against spec. One of my drives reports this TOC as-is and CUERipper crashes when loading the disc info. Another drive I have seems to silently fix the bad TOC and works correctly.
Stacktrace of exception:
The text was updated successfully, but these errors were encountered: