aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2019-11-04 21:22:54 -0500
committerTheodore Ts'o <tytso@mit.edu>2019-11-04 21:22:54 -0500
commit6dac306792b98ae9111e8da2b2f4341592812c5a (patch)
treef707da9850e74fb96334878c4e076d6c0a5913ba
parent41c05c9dc26a87bf0ffea64976be1a34dd542056 (diff)
downloade2fsprogs-6dac306792b98ae9111e8da2b2f4341592812c5a.tar.gz
Fix UBSan when shifting (1LL << 63)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--lib/ext2fs/qcow2.h4
-rw-r--r--misc/e2image.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/ext2fs/qcow2.h b/lib/ext2fs/qcow2.h
index 5576348a8..b649c9cf4 100644
--- a/lib/ext2fs/qcow2.h
+++ b/lib/ext2fs/qcow2.h
@@ -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
diff --git a/misc/e2image.c b/misc/e2image.c
index 3c881feec..30f25432a 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -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 */