]> git.proxmox.com Git - mirror_lxc.git/commitdiff
coverity: #1426130
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 20 Oct 2018 10:04:33 +0000 (12:04 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 22 Oct 2018 14:48:37 +0000 (16:48 +0200)
Bad bit shift operation

Fixes: commit b5b12b9e759 ("criu: add feature check capability")
Cc: Adrian Reber <areber@redhat.com>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/criu.c

index c8cd449de62a83427616798b093c37c20714f608..60cdb17e8156a93ceea344a4f463bc29aa8be3f5 100644 (file)
@@ -695,7 +695,7 @@ bool __criu_check_feature(uint64_t *features_to_check)
                return false;
        }
 
-       while (current_bit < sizeof(uint64_t) * 8) {
+       while (current_bit < (sizeof(uint64_t) * 8 - 1)) {
                /* only test requested features */
                if (!(features & (1ULL << current_bit))) {
                        /* skip this */