diff mbox series

[OpenWrt-Devel] libfstools: Fix overflow of F2FS_MINSIZE constant

Message ID 1553677446-29116-1-git-send-email-ynezz@true.cz
State Accepted, archived
Headers show
Series [OpenWrt-Devel] libfstools: Fix overflow of F2FS_MINSIZE constant | expand

Commit Message

Petr Štetiar March 27, 2019, 9:04 a.m. UTC
I wasn't able to to use f2fs on armvirt/32 platform and I've found out
that it was due to F2FS_MINSIZE constant overflow leading to value of 13
exabytes instead of 100 megabytes.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 libfstools/rootdisk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libfstools/rootdisk.c b/libfstools/rootdisk.c
index 68a6296..5a6dcb9 100644
--- a/libfstools/rootdisk.c
+++ b/libfstools/rootdisk.c
@@ -11,7 +11,6 @@ 
  * GNU General Public License for more details.
  */
 
-#define F2FS_MINSIZE	(100 * 1024 * 1024)
 #define _FILE_OFFSET_BITS 64
 
 #include <sys/types.h>
@@ -31,6 +30,7 @@ 
 #include <linux/loop.h>
 
 #define ROOTDEV_OVERLAY_ALIGN	(64ULL * 1024ULL)
+#define F2FS_MINSIZE		(100ULL * 1024ULL * 1024ULL)
 
 struct squashfs_super_block {
 	uint32_t s_magic;