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

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