Skip to content

Commit

Permalink
ISOLINUX: Fix checksum calculation in lzo/prepcore.c
Browse files Browse the repository at this point in the history
The prescription for Boot Info Table says that checksumming begins
at byte 64 of isolinux.bin. When prepcore writes isolinux.bin it begins
copying bytes from the input file at the offset given by variable "start".
But it begins checksumming at offset 64 of the input file.
The problem exists since introduction of prepcore by release 4.00.
ISO 9660 programs usually fix it when they write the Boot Info Table.

Signed-off-by: Thomas Schmitt <scdbackup@gmx.net>
  • Loading branch information
scdbackup authored and geneC committed Oct 25, 2018
1 parent 2ea44cb commit ac39cff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lzo/prepcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ int main(int argc, char *argv[])
unsigned int ptr;
outfile_len =
((offset - start + out_len + 2047) & ~2047) - (offset - start);
for (ptr = 64; ptr < offset; ptr += 4)
for (ptr = start + 64; ptr < offset; ptr += 4)
csum += get_32((uint32_t *) (infile + ptr));
for (ptr = 0; ptr < outfile_len; ptr += 4)
csum += get_32((uint32_t *) (out + ptr));
Expand Down

0 comments on commit ac39cff

Please sign in to comment.