]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
osdc/Journaler.cc: fix integer overflow
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 17 Jun 2015 17:53:42 +0000 (19:53 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 17 Jul 2015 08:50:45 +0000 (10:50 +0200)
commit56a30cfd9afca2d94f5441a349de72641e1558f1
tree20981f92190b0d4cfb8836a9fe9972373cfb2f56
parent1fece689bea6e98d4e82399734f18f94c7a3ba7f
osdc/Journaler.cc: fix integer overflow

Fix for:

CID 1297861 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
 overflow_before_widen: Potentially overflowing expression
  this->layout.fl_stripe_count.operator __u32() *
  this->layout.fl_object_size.operator __u32() with type unsigned int
  (32 bits, unsigned) is evaluated using 32-bit arithmetic, and then used
  in a context that expects an expression of type uint64_t (64 bits, unsigned).

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