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

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