nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0171-xfs-silence-Coverity-overflow-warning.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Andrei Borzenkov <arvidjaar@gmail.com>
f725e3
Date: Fri, 19 Jun 2015 18:38:25 +0300
f725e3
Subject: [PATCH] xfs: silence Coverity overflow warning
f725e3
f725e3
inode size cannot really overflow integer, but Coverity does not know it.
f725e3
CID: 96602
f725e3
---
f725e3
 grub-core/fs/xfs.c | 2 +-
f725e3
 1 file changed, 1 insertion(+), 1 deletion(-)
f725e3
f725e3
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
f725e3
index f00e43e7dc3..72492915533 100644
f725e3
--- a/grub-core/fs/xfs.c
f725e3
+++ b/grub-core/fs/xfs.c
f725e3
@@ -361,7 +361,7 @@ grub_xfs_inode_offset (struct grub_xfs_data *data,
f725e3
 static inline grub_size_t
f725e3
 grub_xfs_inode_size(struct grub_xfs_data *data)
f725e3
 {
f725e3
-  return 1 << data->sblock.log2_inode;
f725e3
+  return (grub_size_t)1 << data->sblock.log2_inode;
f725e3
 }
f725e3
 
f725e3
 /*