dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
ecb9bb
From: Andrei Borzenkov <arvidjaar@gmail.com>
ecb9bb
Date: Fri, 19 Jun 2015 18:38:25 +0300
28f7f8
Subject: [PATCH] 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
28f7f8
index f00e43e7dc3..72492915533 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
 /*