Commit 95acd4cb authored by Vladimir Serbinenko's avatar Vladimir Serbinenko

gzio: fix unaligned access

parent 4f31bfe1
...@@ -1116,7 +1116,7 @@ inflate_window (grub_gzio_t gzio) ...@@ -1116,7 +1116,7 @@ inflate_window (grub_gzio_t gzio)
grub_uint32_t csum; grub_uint32_t csum;
gzio->hdesc->final (gzio->hcontext); gzio->hdesc->final (gzio->hcontext);
csum = *(grub_uint32_t *)gzio->hdesc->read (gzio->hcontext); csum = grub_get_unaligned32 (gzio->hdesc->read (gzio->hcontext));
csum = grub_be_to_cpu32 (csum); csum = grub_be_to_cpu32 (csum);
if (csum != gzio->orig_checksum) if (csum != gzio->orig_checksum)
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA, grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment