From: Theodore Ts'o Date: Tue, 5 Nov 2019 02:22:54 +0000 (-0500) Subject: Fix UBSan when shifting (1LL << 63) X-Git-Tag: v1.45.5~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dac306792b98ae9111e8da2b2f4341592812c5a;p=thirdparty%2Fe2fsprogs.git Fix UBSan when shifting (1LL << 63) Signed-off-by: Theodore Ts'o --- 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 */