]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix UBSan when shifting (1LL << 63)
authorTheodore Ts'o <tytso@mit.edu>
Tue, 5 Nov 2019 02:22:54 +0000 (21:22 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 Nov 2019 02:22:54 +0000 (21:22 -0500)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/qcow2.h
misc/e2image.c

index 5576348a87c3a0902dc71faf0c0d5404b87bde8f..b649c9cf44401255413ac1ed1cc4a312e84c0ab5 100644 (file)
@@ -30,8 +30,8 @@
 
 #define QCOW_MAGIC (('Q' << 24) | ('F' << 16) | ('I' << 8) | 0xfb)
 #define QCOW_VERSION           2
-#define QCOW_OFLAG_COPIED      (1LL << 63)
-#define QCOW_OFLAG_COMPRESSED  (1LL << 62)
+#define QCOW_OFLAG_COPIED      (1ULL << 63)
+#define QCOW_OFLAG_COMPRESSED  (1ULL << 62)
 
 #define QCOW_COMPRESSED                1
 #define QCOW_ENCRYPTED         2
index 3c881feec01a7aa77ac84ae698ece3689518f253..30f25432a3db4a2b87626a5436bf72c6b744665e 100644 (file)
@@ -54,7 +54,7 @@ extern int optind;
 #include "support/plausible.h"
 #include "../version.h"
 
-#define QCOW_OFLAG_COPIED     (1LL << 63)
+#define QCOW_OFLAG_COPIED     (1ULL << 63)
 #define NO_BLK ((blk64_t) -1)
 
 /* Image types */