Skip to content
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

[BUG] bchunk does not use ECC data in mode1/2352 data to correct errors when converting to iso #18

Open
1dolla opened this issue Aug 11, 2024 · 0 comments

Comments

@1dolla
Copy link

1dolla commented Aug 11, 2024

A lot of (historical, if not current) CD ripping software will, or could by configuration (e.g. CDRWIN), rip a CD into a mode1/2352 bin/cue set and ignore any errors it encountered. This could be for the purpose of ripping game CDs with intentionally corrupt sectors.

A lot of regular bin/cue sets without any such copy protection concerns have been distributed with unintentional ripping errors. Most virtual drive software will gracefully use the ECC data in such bin/cue sets to correct errors on-the-fly when the image is mounted. However, if a software converts such bin/cue sets to formats without ECC data (e.g. bin/cue 2048, nrg, iso) and simply discards ECC data when converting, it will create corrupted image files.

This is apparently the case with bchunk.

E.g.:

$ bchunk regular-cd-mode-1-2352.bin regular-cd-mode-1-2352.cue good
 </snip>
 1: good.iso  656/656  MB  [********************] 100 %
$ echo $?
0
$ sudo dd if=/dev/disk0 of=regular-cd-mode-1-2352.bin bs=1 count=1 seek=200000000 conv=notrunc
1+0 records in
1+0 records out
1 byte copied, 0.014703 s, 0.1 kB/s
$ bchunk regular-cd-mode-1-2352.bin regular-cd-mode-1-2352.cue bad
 </snip>
 1: bad.iso  656/656  MB  [********************] 100 %
$ echo $?
0
$ diff good.iso bad.iso
Binary files good.iso and bad.iso differ

No error messages are printed, exit codes are good, everything seemingly is good, but the dump is corrupt.

Cheers :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant