dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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