mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-11-18 20:07:55 +00:00
Avoid potential read off end of trackimage
This commit is contained in:
parent
651ac246e3
commit
ef1963a175
@ -388,8 +388,10 @@ static void denibblize_track(const uint8_t * const src, int drive, uint8_t * con
|
||||
RELEASE_LOG("WRAPPING PROLOGUE ...");
|
||||
offset -= disk6.disk[drive].track_width;
|
||||
}
|
||||
sector = ((trackimage[offset++] & 0x55) << 1);
|
||||
sector |= (trackimage[offset++] & 0x55);
|
||||
sector = ((trackimage[offset] & 0x55) << 1);
|
||||
offset = (offset+1) % disk6.disk[drive].track_width;
|
||||
sector |= (trackimage[offset] & 0x55);
|
||||
offset = (offset+1) % disk6.disk[drive].track_width;
|
||||
continue;
|
||||
}
|
||||
if (UNLIKELY(prologue[2] != 0xAD)) {
|
||||
|
Loading…
Reference in New Issue
Block a user