mirror of
https://src.fedoraproject.org/rpms/grub2.git
synced 2024-11-24 22:35:28 +00:00
23 lines
805 B
Diff
23 lines
805 B
Diff
|
From 95acd4cbdac495c088fc3401fa365455f7039151 Mon Sep 17 00:00:00 2001
|
||
|
From: Vladimir Serbinenko <phcoder@google.com>
|
||
|
Date: Wed, 30 Aug 2017 20:46:14 +0200
|
||
|
Subject: [PATCH] gzio: fix unaligned access
|
||
|
|
||
|
---
|
||
|
grub-core/io/gzio.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/grub-core/io/gzio.c b/grub-core/io/gzio.c
|
||
|
index dcf3a870147..86ea8cfdea2 100644
|
||
|
--- a/grub-core/io/gzio.c
|
||
|
+++ b/grub-core/io/gzio.c
|
||
|
@@ -1116,7 +1116,7 @@ inflate_window (grub_gzio_t gzio)
|
||
|
grub_uint32_t csum;
|
||
|
|
||
|
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);
|
||
|
if (csum != gzio->orig_checksum)
|
||
|
grub_error (GRUB_ERR_BAD_COMPRESSED_DATA,
|