Buffer overrun in encode_6_and_2()
tomcw opened this issue · comments
This code overruns at location
==1:
while(location) {
--location;
dest[location] ^= dest[location-1];
}
So should be:
while(location>1) {
--location;
dest[location] ^= dest[location-1];
}
I built with VS2017 (and VS2008) and it creates broken .woz images, as the 1st nibble of each sector is wrong.
Thanks, sorry for not noticing this earlier. You're completely right, corrected.