]> git.ipfire.org Git - thirdparty/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>
Thu, 22 Nov 2018 07:31:30 +0000 (08:31 +0100)
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 6578779b94777b350ea87171846d2ff41ea1e00f..996587f6f017e844829881988ea4725257c91998 100644 (file)
@@ -694,7 +694,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 */