]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
src/rbd.cc: use 64-bits to shift 'order'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 13 May 2013 14:19:46 +0000 (16:19 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 14 May 2013 16:39:32 +0000 (18:39 +0200)
commit21489acffebbcb2663e8a15e988f8902c4e689e6
treeadc1bb8f09cdf8c481495490d948ff157d2deee4
parent3e446825193a3bdc613445f5e12a58ce70ab7d5f
src/rbd.cc: use 64-bits to shift 'order'

CID 1019568 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
  overflow_before_widen: Potentially overflowing expression "1 << *order" with
  type "int" (32 bits, signed) is evaluated using 32-bit arithmetic before being
  used in a context which expects an expression of type "uint64_t" (64 bits,
  unsigned). To avoid overflow, cast the left operand to "uint64_t" before
  performing the left shift.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rbd.cc