From: Christian Brauner Date: Sat, 20 Oct 2018 10:04:33 +0000 (+0200) Subject: coverity: #1426130 X-Git-Tag: lxc-3.1.0~29^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d61f17dd64de9b030adf0e0ab0ed1b56b999603;p=thirdparty%2Flxc.git coverity: #1426130 Bad bit shift operation Fixes: commit b5b12b9e759 ("criu: add feature check capability") Cc: Adrian Reber Signed-off-by: Christian Brauner --- diff --git a/src/lxc/criu.c b/src/lxc/criu.c index c8cd449de..60cdb17e8 100644 --- a/src/lxc/criu.c +++ b/src/lxc/criu.c @@ -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 */