search for: outfile_len

Displaying 7 results from an estimated 7 matches for "outfile_len".

2018 Jan 26
1
[PATCH] ISOLINUX: Fix checksum calculation in lzo/prepcore.c
...duction 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 at gmx.net> --- --- a/lzo/prepcore.c +++ b/lzo/prepcore.c @@ -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...
2018 Jan 13
1
Is this off topic?
...ed patch; then maybe we would get some relevant (re)action about this issue from The Syslinux Project? diff --git a/lzo/prepcore.c b/lzo/prepcore.c index 9147b2e4..b5ebe88b 100644 --- a/lzo/prepcore.c +++ b/lzo/prepcore.c @@ -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...
2018 Jan 12
1
isolinux.bin checksum
H, Ady wrote: > A_ The default checksum included in the tested isolinux.bin (offset 20, > 4-bytes-long) is the "correct" one (as oppose to the current situation, > since version 4.00). That's good news. > F_ In the tested isolinux.bin file, there are two additional bytes that > I found to be changed/affected by some ISO-building tools (e.g. > mkisofs), at
2018 Jan 09
2
isolinux.bin checksum
...(which stems from an objcopy -S run) and from a compressed part. So it begins to compute the checksum on the input file bytes for (ptr = 64; ptr < offset; ptr += 4) csum += get_32((uint32_t *)(infile+ptr)); and then continues on the compressed part for (ptr = 0; ptr < outfile_len; ptr += 4) csum += get_32((uint32_t *)(out+ptr)); - But prepcore.c copies infile data to isolinux.bin starting with an offset named "start" which i strongly believe is not zero: if (fwrite(infile+start,1,offset-start,f) != offset-start || If "start" is not zer...
2018 Jan 08
2
isolinux.bin checksum
> Hi, > > Ady wrote: > > During May 2009, a commit by Peter deleted the checksumiso.pl file. The > > commit is: > > core: LZO compress the PM part of the core > > repo.or.cz/syslinux.git/commit/0d82b71304d596d80f3c4520f9dcf90048ca50b7 > > And so, since version 4.00, the 'code/checksumiso.pl' file is no longer > > included. > > How is
2018 Jan 09
0
isolinux.bin checksum
...----------------- Unsuccessful theories so far: The only potential problem i found in lzo/prepcore.c up to now, is that the buffer for the compressed isolinux.bin is created by malloc(3), which does not guarantee to hand out the buffer will all zeros as content. prepcore nevertheless rounds up the outfile_len to finally yield full blocks of 2048 bytes size. So up to 2047 bytes of arbitrary discarded memory content could end up in the compressed isolinux.bin. But those bytes would also be part of prepcore's checksum computation. So the checksum should match the one from libisofs. I further tried to...
2018 Jan 09
0
isolinux.bin checksum
...from a compressed part. > So it begins to compute the checksum on the input file bytes > > for (ptr = 64; ptr < offset; ptr += 4) > csum += get_32((uint32_t *)(infile+ptr)); > > and then continues on the compressed part > > for (ptr = 0; ptr < outfile_len; ptr += 4) > csum += get_32((uint32_t *)(out+ptr)); > > - But prepcore.c copies infile data to isolinux.bin starting with an > offset named "start" which i strongly believe is not zero: > > if (fwrite(infile+start,1,offset-start,f) != offset-start || >...