* grub-core/io/lzopio.c (read_block_header): Fix incorrect byte swapping
(test_header): Likewise.
This commit is contained in:
parent
9f9d3f69f4
commit
fd556a962e
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2012-04-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/io/lzopio.c (read_block_header): Fix incorrect byte swapping
|
||||||
|
(test_header): Likewise.
|
||||||
|
|
||||||
2012-04-07 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-04-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Fix --help formatting.
|
Fix --help formatting.
|
||||||
|
|
|
@ -126,7 +126,7 @@ read_block_header (struct grub_lzopio *lzopio)
|
||||||
sizeof (lzopio->block.ucheck))
|
sizeof (lzopio->block.ucheck))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
lzopio->block.ucheck = grub_be_to_cpu32 (lzopio->block.ucheck);
|
lzopio->block.ucheck = lzopio->block.ucheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read checksum of compressed data. */
|
/* Read checksum of compressed data. */
|
||||||
|
@ -144,7 +144,7 @@ read_block_header (struct grub_lzopio *lzopio)
|
||||||
sizeof (lzopio->block.ccheck))
|
sizeof (lzopio->block.ccheck))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
lzopio->block.ccheck = grub_be_to_cpu32 (lzopio->block.ccheck);
|
lzopio->block.ccheck = lzopio->block.ccheck;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ test_header (grub_file_t file)
|
||||||
|
|
||||||
if (hcheck)
|
if (hcheck)
|
||||||
{
|
{
|
||||||
checksum = grub_cpu_to_be32(checksum);
|
checksum = checksum;
|
||||||
if (grub_memcmp (&checksum, hcheck->read(context), sizeof(checksum)) != 0)
|
if (grub_memcmp (&checksum, hcheck->read(context), sizeof(checksum)) != 0)
|
||||||
goto CORRUPTED;
|
goto CORRUPTED;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue