Displaying 7 results from an estimated 7 matches for "get_32".
Did you mean:
get32
2018 Jan 09
2
isolinux.bin checksum
...yslinux.git/blob/0d82b71304d596d80f3c4520f9dcf90048ca50b7:/lzo/prepcore.c
it seems that this change in line 374 could yield correct checksums:
unsigned int ptr;
- for (ptr = 64; ptr < offset; ptr += 4)
+ for (ptr = start+64; ptr < offset; ptr += 4)
csum += get_32((uint32_t *)(infile+ptr));
A test whether it works would be to produce isolinux.bin, read the 4 checksum
bytes from it at offset 20, put isolinux.bin into an ISO with mkisofs option
-boot-info-table, and check whether the 4 bytes at offset 20 are still the
same.
(If you use mkisofs or genisoimage...
2018 Jan 09
0
isolinux.bin checksum
...6d80f3c4520f9dcf90048ca50b7:/lzo/prepcore.c
> it seems that this change in line 374 could yield correct checksums:
>
> unsigned int ptr;
> - for (ptr = 64; ptr < offset; ptr += 4)
> + for (ptr = start+64; ptr < offset; ptr += 4)
> csum += get_32((uint32_t *)(infile+ptr));
>
>
> A test whether it works would be to produce isolinux.bin, read the 4 checksum
> bytes from it at offset 20, put isolinux.bin into an ISO with mkisofs option
> -boot-info-table, and check whether the 4 bytes at offset 20 are still the
> same.
>...
2018 Jan 26
1
[PATCH] ISOLINUX: Fix checksum calculation in lzo/prepcore.c
...+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));
--
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 13
1
Is this off topic?
...ore.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_t *) (out + ptr));
--
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
0
isolinux.bin checksum
...in.
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 provoke the initial checksum of isolinux.bin by spoiling
the byte order of the 4-byte unsigned integers which get added.
But prepcode's function get_32() in both variants yields on amd64 the same
integer values as libisofs sees. Willfully reverting byte order of the
integers does not yield the initial checksum 0x09e675b8.
Another suspect would be a difference between checksum computation and
effective file writing. But the code looks good in that...