changeset 2040:3a7ce77c7f2d

Fix integer overflows vs. shifts.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 30 Nov 2018 06:51:57 +0200
parents 210a0041081b
children 493d79ea50a8
files tools/fanalyze.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tools/fanalyze.c	Fri Nov 30 06:48:36 2018 +0200
+++ b/tools/fanalyze.c	Fri Nov 30 06:51:57 2018 +0200
@@ -77,11 +77,11 @@
 
 static const DMGrepDef dmGrepTypes[DMGV_last] =
 {
-    { "8bit (byte)"      , (1UL <<  8) - 1, 1 },
-    { "16bit (word) LE"  , (1UL << 16) - 1, 2 },
-    { "16bit (word) BE"  , (1UL << 16) - 1, 2 },
-    { "32bit (word) LE"  , (1UL << 32) - 1, 4 },
-    { "32bit (word) BE"  , (1UL << 32) - 1, 4 },
+    { "8bit (byte)"      , (1ULL <<  8) - 1, 1 },
+    { "16bit (word) LE"  , (1ULL << 16) - 1, 2 },
+    { "16bit (word) BE"  , (1ULL << 16) - 1, 2 },
+    { "32bit (word) LE"  , (1ULL << 32) - 1, 4 },
+    { "32bit (word) BE"  , (1ULL << 32) - 1, 4 },
 };