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

fix HFE disk write #6661

Merged
merged 1 commit into from
May 7, 2020
Merged

fix HFE disk write #6661

merged 1 commit into from
May 7, 2020

Conversation

kkaempf
Copy link
Contributor

@kkaempf kkaempf commented May 7, 2020

this fixes https://mametesters.org/view.php?id=7526

src/lib/formats/hxchfe_dsk.cpp reproducibly creates a SEGV when writing HFE files. This is caused by an endless loop in hfe_format::generate_hfe_bitstream_from_track, writing beyond end-of-array at

cylinder_buffer[offset++] = current;

The endless loop is caused by re-setting cur_pos at two occasions and re-setting the loop variable.

This fix drops the reset of cur_pos resulting in a successful write of a mixed-density (track0 sd, others dd) HFE image.

@ajrhacker ajrhacker merged commit 28b50b7 into mamedev:master May 7, 2020
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

Successfully merging this pull request may close these issues.

2 participants