dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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