Blame SOURCES/0279-grub-module-verifier-fix-unintended-sign-extension.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
28f7f8
From: Andrei Borzenkov <arvidjaar@gmail.com>
28f7f8
Date: Fri, 8 Jan 2016 11:05:16 +0300
28f7f8
Subject: [PATCH] grub-module-verifier: fix unintended sign extension
28f7f8
28f7f8
Found by: Coverity scan.
28f7f8
CID: 156533, 156532
28f7f8
---
28f7f8
 util/grub-module-verifierXX.c | 2 +-
28f7f8
 1 file changed, 1 insertion(+), 1 deletion(-)
28f7f8
28f7f8
diff --git a/util/grub-module-verifierXX.c b/util/grub-module-verifierXX.c
28f7f8
index 25988ebc21d..f612d51f389 100644
28f7f8
--- a/util/grub-module-verifierXX.c
28f7f8
+++ b/util/grub-module-verifierXX.c
28f7f8
@@ -337,7 +337,7 @@ SUFFIX(grub_module_verify) (void *module_img, size_t size, const struct grub_mod
28f7f8
 
28f7f8
   /* Make sure that every section is within the core.  */
28f7f8
   if (size < grub_target_to_host (e->e_shoff)
28f7f8
-      + grub_target_to_host16 (e->e_shentsize) * grub_target_to_host16(e->e_shnum))
28f7f8
+      + (grub_uint32_t) grub_target_to_host16 (e->e_shentsize) * grub_target_to_host16(e->e_shnum))
28f7f8
     {
28f7f8
       grub_util_error ("ELF sections outside core");
28f7f8
     }