Commit 18136d83068ab7f2b690a6347e1ef6d806c13d30

Sebastian Schuberth 2011-09-08T16:43:58

Fix an integral overflow on 64-bit

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/mwindow.c b/src/mwindow.c
index 585d75c..b259218 100644
--- a/src/mwindow.c
+++ b/src/mwindow.c
@@ -35,7 +35,7 @@
 		: 32 * 1024 * 1024)
 
 #define DEFAULT_MAPPED_LIMIT \
-	((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))
+	((1024 * 1024) * (sizeof(void*) >= 8 ? 8192ULL : 256UL))
 
 /*
  * We need this because each process is only allowed a specific amount